From 94739ba9716babfe58aa41320512e0ceb44fae2b Mon Sep 17 00:00:00 2001 From: Nicolas Bouilleaud Date: Fri, 19 Apr 2019 11:50:42 +0200 Subject: [PATCH] Fix i18n.php review comments Use the DEFAULT_LANGUAGE as the default in locale_lookup. --- app/inc/i18n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/inc/i18n.php b/app/inc/i18n.php index f211a8d..6f2d4a5 100644 --- a/app/inc/i18n.php +++ b/app/inc/i18n.php @@ -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);