Magento 2 – Proper Way to Set Translation Priority

csvlocalisationmagento-2.1magento2

I'm trying to set up a spanish-english store.

I have my dictionary that I want to reutilize for other stores. It has all translations in spanish. I install this dictionary on app/i18n/vendor/es_es/
At this point is all okay. I have standard translations so my store is on english-spanish.

But now, you install the template and customizations. Typical change is you want "wish list" instead of "add to wish list".

You can fix this easily creating i18n folder on theme folder and creating en_US csv file to customize all phrases you want.

But if you try to do the same on other languages, creating for example es_ES csv file, it won't take effect. Seems that on spanish it priorizes my dictionary.

To be clear, I have this 2 csv files on my theme:

app/design/frontend/vendor/theme/i18n/en_US.csv
app/design/frontend/vendor/theme/i18n/es_ES.csv

The thing is, en_US.csv is working but es_ES.csv doesn't.

What can I do to priorize the translations on theme?

Or what is the proper way to achieve my objective? having a standard dictionary and then customizing some phrases.

I don't want to use inline-translations.

Best Answer

Currently, language pack translations have priority over theme translations.

This is going to be fixed in Magento 2.2, see https://github.com/magento/magento2/pull/7142