1

Magento has 4-5 ways to translate and haven't good explanation of translation priority.

Translates can be

  • in themes
  • in modules
  • in translate package
  • in sub folders of themes/modules

There is my csv:

"Summary","Сводка","theme","frontend/ThemeVendor/theme-name"
"Summary","Обзор","module","Magento_Checkout"
"Summary","Заголовок","module","Magento_Review"

Add: Magento 2 in some cases can't translate phrases. Translate package helps...

So, my config is

  • ru_RU.csv in the theme
  • in the app/i18n//ru_RU/*

Magento use the last one translation independent of module was been specified, if in CSV has not theme's translation. I suppose Magento ignore CSV's 3rd column for example

"Summary","Заголовок","module","Magento_Review" "Summary","Обзор","module","Magento_Checkout"

All translation will be 'Обзор'

Is there exist any 'academic' solution to apply correct translate phrases to corresponding module's templates (instead of it's changing)?

1
  • The top priority for translation in Magento is the INLINE TRANSLATION, which is found in Stores >> Configuration >> Advanced >> Developer >> Translate Inline. Well, very nice question. :) Apr 2, 2019 at 12:10

2 Answers 2

1

I know the topic is a little bit older already, but the default order of translation loading is defined in \Magento\Framework\Translate::loadData and is as follows (changed here in Oct., 2016):

  • Module translations
  • Language packs
  • Theme translations
  • Database translations

Here you have the current status on 2.4 develop branch.

0

As far as I remember, translation works in the following order

  1. module translations
  2. theme translation
  3. translation package (language pack)
  4. database translation (Inline translation)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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