+ // Default extension translation from the current theme
+ $theme = $this->conf->get('theme');
+ $themeTransFolder = rtrim($this->conf->get('raintpl_tpl'), '/') .'/'. $theme .'/language';
+ if (is_dir($themeTransFolder)) {
+ try {
+ $translations = Translations::fromPoFile(
+ $themeTransFolder .'/'. $this->language .'/LC_MESSAGES/'. $theme .'.po'
+ );
+ $translations->setDomain($theme);
+ $this->translator->loadTranslations($translations);
+ } catch (\InvalidArgumentException $e) {
+ }
+ }