Magento2: Lot of translations not working

Created on 28 Jun 2016  路  13Comments  路  Source: magento/magento2

Steps to reproduce

  1. Install Magento 2.0.7
  2. Add Russian translation pack in app/i18n/<vendor>/ru_ru/ which has all the files (composer.json, language.xml, registration.php and ru_RU.csv)
  3. Configure several store views e.g. English and Russian and set corresponding locales for each.

    Expected result

  4. Translations appear in all places

    Actual result

  5. There are lot of places were translations do not show up - default English text is shown

See http://screencast.com/t/xI8C1E8RUxny for example - "My Account" is translated and it does show up correctly in most places except breadcrumb.

Here is the incomplete list of places where translations does not work:

  • breadcrumbs => every page
  • minicart
  • cart => at least Total
  • checkout#shipping => all of it
  • checkout#payment => discount code block (even though it gets translated in cart) and order summary
Translation needs update bug report

Most helpful comment

You can install language package follow the instructions in here : https://github.com/splendidinternet/Magento2_German_LocalePack_de_DE

  • Very important: remove first js-translation.json from pub/static/frontend/Magento/luma/de_DE/js-translation.json
  • Then run command:
    php bin/magento setup:static-content:deploy de_DE
    php bin/magento setup:upgrade

All 13 comments

Turns out to get translations working You need to deploy static content all over. Otherwise translations in Knockout templates won't work.
With all that there are still translations that do not work:

  • Pleasespecify a shipping method
  • Provided Zip/Postal Code seems to be invalid. Example: 1234. If you believe it is the right one you can ignore this notice.
  • http://screencast.com/t/J1jCsyTB2P checkout step titles Shipping and Review & Payments
  • http://screencast.com/t/wnoLHyY0BT4 Are you sure you would like to remove this item from the shopping cart?

Informational: as an alternative for flushing the knockout templates cache, you can also remove the files in:

  • var/view_preprocessed/...
  • pub/static/frontend/...

It works a bit faster then doing the whole static deploy dance. Although you'll still have to sit and wait for a minute or so until everything gets regenerated when you refresh your page in the browser.

@hostep I believe that does not apply for production environment though

Yes that's correct, only for local development mode. Sorry, I should have made that more clear.

Is this still actual?

@sevos1984 haven't had time to check it on latest 2.0.* version yet

This should be fixed in latest develop branch commit https://github.com/magento/magento2/commit/14028aad37ee7435d89eb3b647e6d03ecd8e2e13. Patch will be soon delivered into 2.0 branch.

@sevos is this commit safe to merge into a 2.1.1 production site, or is a patch planned? Thanks.

@sevos1984

Hello, my first post here.

This issue still occurs on 2.1.4. Any chances for a patch?

Thanks,
Michael

You can install language package follow the instructions in here : https://github.com/splendidinternet/Magento2_German_LocalePack_de_DE

  • Very important: remove first js-translation.json from pub/static/frontend/Magento/luma/de_DE/js-translation.json
  • Then run command:
    php bin/magento setup:static-content:deploy de_DE
    php bin/magento setup:upgrade

We've noticed another issue with translations which have double spaces in the strings, for example;

"This is a line of text. This is the next line","translated version of text. Translated version of next line"

This works fine in developer mode, but in production strings with double spaces dont work. Remove the double spaces from templates and the corresponding translation string in your csv.

Same issue on backend in magento 2.1.8, any fix?

Was this page helpful?
0 / 5 - 0 ratings