private function loadModuleTranslationDirectories(Module $module, array &$translationDirs, $templateHelper) { // Core module translation if (is_dir($dir = $module->getAbsoluteI18nPath())) { $translationDirs[$module->getTranslationDomain()] = $dir; } // Admin includes translation if (is_dir($dir = $module->getAbsoluteAdminIncludesI18nPath())) { $translationDirs[$module->getAdminIncludesTranslationDomain()] = $dir; } // Module back-office template, if any $templates = $templateHelper->getList(TemplateDefinition::BACK_OFFICE, $module->getAbsoluteTemplateBasePath()); foreach ($templates as $template) { $translationDirs[$module->getBackOfficeTemplateTranslationDomain($template->getName())] = $module->getAbsoluteBackOfficeI18nTemplatePath($template->getName()); } // Module front-office template, if any $templates = $templateHelper->getList(TemplateDefinition::FRONT_OFFICE, $module->getAbsoluteTemplateBasePath()); foreach ($templates as $template) { $translationDirs[$module->getFrontOfficeTemplateTranslationDomain($template->getName())] = $module->getAbsoluteFrontOfficeI18nTemplatePath($template->getName()); } // Module pdf template, if any $templates = $templateHelper->getList(TemplateDefinition::PDF, $module->getAbsoluteTemplateBasePath()); foreach ($templates as $template) { $translationDirs[$module->getPdfTemplateTranslationDomain($template->getName())] = $module->getAbsolutePdfI18nTemplatePath($template->getName()); } // Module email template, if any $templates = $templateHelper->getList(TemplateDefinition::EMAIL, $module->getAbsoluteTemplateBasePath()); foreach ($templates as $template) { $translationDirs[$module->getEmailTemplateTranslationDomain($template->getName())] = $module->getAbsoluteEmailI18nTemplatePath($template->getName()); } }