mirror of
https://framagit.org/framasoft/framadate/framadate
synced 2026-07-28 12:04:23 +00:00
Fix i18n.php review comments
Use the DEFAULT_LANGUAGE as the default in locale_lookup.
This commit is contained in:
parent
20240fee15
commit
94739ba971
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ class __i18n {
|
|||
public static function translate($key) {
|
||||
if (!isset(self::$translator)) {
|
||||
global $locale, $ALLOWED_LANGUAGES;
|
||||
$found_locale = locale_lookup(array_keys($ALLOWED_LANGUAGES), $locale);
|
||||
$found_locale = locale_lookup(array_keys($ALLOWED_LANGUAGES), $locale, false, DEFAULT_LANGUAGE);
|
||||
self::$translator = new Translator($found_locale);
|
||||
self::$translator->addLoader('pofile', new PoFileLoader());
|
||||
self::$translator->addResource('pofile', ROOT_DIR . "po/{$found_locale}.po", $found_locale);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue