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!
Asked
Active
Viewed 2,837 times
2
Zinat
- 2,069
- 2
- 28
- 52
3 Answers
2
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
Khoa TruongDinh
- 32,054
- 11
- 88
- 155
-
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 cleaned – Zinat Oct 28 '16 at 10:57
-
@Zinat how you translate in your Knock out template? Please, add proper code lines? – Khoa TruongDinh Oct 28 '16 at 10:58
-
@Zinat should read more here: http://magento.stackexchange.com/questions/121251/magento2-translating-javascript-ko-template-text – Khoa TruongDinh Oct 28 '16 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? http://devdocs.magento.com/guides/v2.1/config-guide/cli/config-cli-subcommands-i18n.html – Zinat Oct 28 '16 at 11:04
-
I checked the link you sent and I have all those files – Zinat Oct 28 '16 at 11:06
-
I'm going to go, tomorrow I will check your issue again. – Khoa TruongDinh Oct 28 '16 at 11:08
-
I did not do any changes but it's fine now!!! – Zinat Oct 28 '16 at 11:12
-
I try to translate another word(retaled to ko template) in the csv file of the language package, after deploying and cleaning cache the js-translation.json does not contain the new traslation!!! – Zinat Oct 31 '16 at 08:17
1
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.
Soumik Rana
- 193
- 7
-
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 Oct 28 '16 at 10:54
-
1Zinat, also Khoa is right. Please follow the Khoa's procedure and let us know. – Soumik Rana Oct 28 '16 at 11:49
0
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
Zinat
- 2,069
- 2
- 28
- 52