Skip to content

Commit

Permalink
🌐 Update localization directory
Browse files Browse the repository at this point in the history
  • Loading branch information
siguici committed Nov 19, 2023
1 parent 5559afb commit 22dbc1e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ public static function create(string $basePath = null): IsApplication
self::$INSTANCE = new self($basePath);
/** @var string */
$langPath = value(static function (): string {
$directory = self::$INSTANCE->resourcePath('locales');
$directory = is_dir(self::$INSTANCE->resourcePath('locales'))
? self::$INSTANCE->resourcePath('locales')
: self::$INSTANCE->resourcePath('i18n');

if (is_dir($directory)) {
return $directory;
}

return self::$INSTANCE->basePath('locales');
return self::$INSTANCE->basePath('lang');
});
self::$INSTANCE->useLangPath($langPath);
}
Expand Down

0 comments on commit 22dbc1e

Please sign in to comment.