diff --git a/app/Controllers/ThemeController.php b/app/Controllers/ThemeController.php index 731772378..0fb65c76c 100644 --- a/app/Controllers/ThemeController.php +++ b/app/Controllers/ThemeController.php @@ -82,7 +82,7 @@ public function options($theme) $translations = []; foreach ($theme->getSupportedLanguages() as $lang) { - $translations[$lang] = json_decode(file_get_contents($theme->getPath() . "lang/" . $lang . ".json")); + $translations[$lang] = json_decode(file_get_contents($theme->getPath() . $theme->languagePath . "/" . $lang . ".json")); } diff --git a/app/Libs/Theme.php b/app/Libs/Theme.php index ce8ec5787..71fe549a9 100644 --- a/app/Libs/Theme.php +++ b/app/Libs/Theme.php @@ -5,6 +5,7 @@ class Theme { + public $languagePath = "resources/lang"; public function __construct($root_dir) { @@ -71,7 +72,7 @@ public function getPath() public function getSupportedLanguages() { - $lang_dir = $this->getPath() . 'lang'; + $lang_dir = $this->getPath() . $this->languagePath; if (!file_exists($lang_dir)) { return collect();