2

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!

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

8
  • 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: magento.stackexchange.com/questions/121251/… – 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? devdocs.magento.com/guides/v2.1/config-guide/cli/… – 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
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.

2
  • 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
  • 1
    Zinat, 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.