All translations are fine but JS templates are not translated. I realized that /pub/static/frontend/Vendor/theme/nl_NL/js-translation.json is empty!
3 Answers
Delete the current js-translation.json and then try to run the static content deploy again. May need to clear Browser Cache and Magento Cache.
For the translation, we should read more: Magento2 translating Javascript (KO) template text
-
Now I got it with one line only but in FE is still in english {"Add to Cart":"balabla","You have no items in your shopping cart.":"blabla on tyhj\u00e4."} , cache is cleanedZinat– Zinat2016-10-28 10:57:16 +00:00Commented Oct 28, 2016 at 10:57
-
@Zinat how you translate in your Knock out template? Please, add proper code lines?Khoa Truong– Khoa Truong2016-10-28 10:58:09 +00:00Commented Oct 28, 2016 at 10:58
-
@Zinat should read more here: magento.stackexchange.com/questions/121251/…Khoa Truong– Khoa Truong2016-10-28 11:02:02 +00:00Commented Oct 28, 2016 at 11:02
-
All I did was creating the language package then setting the locale in admin panel. Then I delpoyed in nl_NL. Is there additional step for Knock out template translation? devdocs.magento.com/guides/v2.1/config-guide/cli/…Zinat– Zinat2016-10-28 11:04:15 +00:00Commented Oct 28, 2016 at 11:04
-
I checked the link you sent and I have all those filesZinat– Zinat2016-10-28 11:06:14 +00:00Commented Oct 28, 2016 at 11:06
Please be sure that you have the correct file & folder permission in magento 2 folder.
Then Please do static content deploy then also please give permission once again.
Please follow this procedure and let me know.
-
Now I got it with one line only but in FE is still in english {"Add to Cart":"balabla","You have no items in your shopping cart.":"blabla on tyhj\u00e4."}Zinat– Zinat2016-10-28 10:54:26 +00:00Commented Oct 28, 2016 at 10:54
-
1Zinat, also Khoa is right. Please follow the Khoa's procedure and let us know.Soumik Rana– Soumik Rana2016-10-28 11:49:40 +00:00Commented Oct 28, 2016 at 11:49
Steps based on Koha's solution:
1- bin/magento setup:static-content:deploy en_US nl_NL
2- Delete (only)file pub/static/frontend/Vendor/Theme/nl_NL/js-translation.json
3- bin/magento setup:static-content:deploy nl_NL
Even without emptying the cache it worked perfectly