I installed a template and put all the necessary translations in the i18n file but still can't see the translation. My question is: Do I have to create 3 home pages and then choose the store-view for each page or it is a problem in my translation?
2 Answers
For the translate it is not completed once you add translate text in i18 CSV file. because i18 CSV just give the translate value of original words.
Please check below step to keep in mind while translate.
- Add translation text to i18 CSV file (It is translate original word to translate word )
- Make sure In phtml file you need to display words like
<?php echo __("Hello world"); ?>
- All the content are not comming from phtml some of the content are coming from admin CMS Page. so you need to add translated text to there after select store from
store > config
.
For exmple in your case Featured product title is not translated. so for that you need to first check from wher it is comming form admin or phtml? if it comes from phtml then add words to like this <?php echo __("Hello world"); ?>
and if comes from admin CMS then you need to add translated text to there after change store.
-
Ok nop, if you have any concern let me know. if you get solution then +1 :) Sep 27, 2018 at 13:10
-
-
-
ok thanks i have installed a template and now facing problem with base fonctionnalité like filtring with categ and price not working Sep 27, 2018 at 13:13
-
And when i change the store view the look of page category change :'( Sep 27, 2018 at 13:14
inside i18n folder you put translations for static string (from code)
for example for strings like:
<?= __("Hello world"); ?>
Home page is most probably CMS Page and it can be translated in admin panel, like you wrote, by creating them per store view.
Which kind of content is not translated?
-
<?= __("Hello world"); ?> how to put this in i18n exactly ??? Sep 27, 2018 at 12:37
-
This was just an example how strings looks in the code. You can generate translation file for strings from themes and modules. To translate them you can use dictionaries. There is a command to generate file for translation:
magento2/bin/magento i18n:collect-phrases
You can read about it here: devdocs.magento.com/guides/v2.0/frontend-dev-guide/translations/…– Jan ŻabaOct 1, 2018 at 17:15
<?= __("String to translate")?>
.