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!

3 Answers 3

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 Commented Oct 28, 2016 at 10:57
  • @Zinat how you translate in your Knock out template? Please, add proper code lines? Commented Oct 28, 2016 at 10:58
  • @Zinat should read more here: magento.stackexchange.com/questions/121251/… Commented 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/… Commented Oct 28, 2016 at 11:04
  • I checked the link you sent and I have all those files Commented Oct 28, 2016 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."} Commented Oct 28, 2016 at 10:54
  • 1
    Zinat, also Khoa is right. Please follow the Khoa's procedure and let us know. Commented Oct 28, 2016 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 and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.