L10n: Remove the ability to specify the fallback language and use includes instead

This commit is contained in:
Maxim Leshchenko 2021-12-22 18:21:27 +02:00
parent 70b4712c92
commit 6ebae054c6
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE
13 changed files with 25 additions and 13 deletions

View file

@ -57,7 +57,7 @@ class Localizator
$lang = is_null($lang) ? static::DEFAULT_LANG : $lang;
$array = @self::parse(dirname(__FILE__) . "/../../locales/$lang.strings");
return $array[$id] ?? (!empty($array["__fallback"]) ? $this->_($id, $array["__fallback"]) : "@$id");
return $array[$id] ?? "@$id";
}
function export($lang = NULL): ?array

View file

@ -1,6 +1,7 @@
#include <en>
"__locale" = "hy_AM.utf8;hy_AM.UTF-8;Arm";
"__WinEncoding" = "Windows-1251";
"__fallback" = "en";
/* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */

View file

@ -1,5 +1,6 @@
#include <ru>
"__locale" = "be_BY.UTF-8;Bel";
"__fallback" = "ru";
/* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */

View file

@ -1,6 +1,7 @@
#include <ru>
"__locale" = "be_BY@latin;Bel_Lat";
"__WinEncoding" = "Windows-1251";
"__fallback" = "ru";
/* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */

View file

@ -1,5 +1,6 @@
#include <en>
"__locale" = "de_DE.UTF-8;Deu";
"__fallback" = "en";
/* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */

View file

@ -1,5 +1,6 @@
#include <en>
"__locale" = "eo.utf8";
"__fallback" = "en";
/* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */

View file

@ -1,5 +1,6 @@
#include <ru>
"__locale" = "kk_KZ.UTF-8;Kaz";
"__fallback" = "ru";
/* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */

View file

@ -1,6 +1,7 @@
#include <en>
"__locale" = "pl_PL.utf8;pl_PL.UTF-8;Pol";
"__WinEncoding" = "Windows-1251";
"__fallback" = "en";
/* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */

View file

@ -1,6 +1,7 @@
#include <ru>
"__locale" = "ru_UA.utf8;ru_RU.UTF-8;Rus";
"__WinEncoding" = "Windows-1251";
"__fallback" = "ru";
/* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */

View file

@ -1,5 +1,6 @@
#include <ru>
"__locale" = "sr_CS.UTF-8;Srb";
"__fallback" = "ru";
/* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */

View file

@ -1,5 +1,6 @@
#include <en>
"__locale" = "sr_CS.UTF-8;Srb_Latin";
"__fallback" = "en";
/* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */

View file

@ -1,5 +1,6 @@
#include <en>
"__locale" = "tr_TR.UTF-8;Tur";
"__fallback" = "en";
/* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */

View file

@ -1,6 +1,7 @@
#include <ru>
"__locale" = "uk_UA.utf8;Ukr";
"__WinEncoding" = "Windows-1251";
"__fallback" = "ru";
/* Check for https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html */