loadJsonPaths($locale); } if (is_null($namespace) || $namespace === '*') { $themePath = theme_path('lang'); $themeTranslations = $themePath ? $this->loadPaths([$themePath], $locale, $group) : []; $modules = Theme::getModules(); $moduleTranslations = []; foreach ($modules as $module) { $modulePath = $module->path('lang'); if (file_exists($modulePath)) { $moduleTranslations = array_merge($moduleTranslations, $this->loadPaths([$modulePath], $locale, $group)); } } $originalTranslations = $this->loadPaths($this->paths, $locale, $group); return array_merge($originalTranslations, $moduleTranslations, $themeTranslations); } return $this->loadNamespaced($locale, $group, $namespace); } }