How to implement a module-dependent language translation?

localization

(Dmitry Fedyuk) #1

To implement a module-dependent language translation, place your translation to modules (i18n subfolder) instead of language packages.

The Magento\Framework\Translate::_loadModuleTranslation() method detects the current module and makes its translation prioritized: