How to implement a module-dependent language translation?

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: