Skip to content

Commit

Permalink
Language file path fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Timot Tarjani committed Oct 2, 2023
1 parent b5d99e0 commit 5dffefb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Controllers/ThemeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}


Expand Down
3 changes: 2 additions & 1 deletion app/Libs/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
class Theme
{

public $languagePath = "resources/lang";

public function __construct($root_dir)
{
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 5dffefb

Please sign in to comment.