summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/locales.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers/locales.php')
-rw-r--r--modules/gallery/helpers/locales.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/gallery/helpers/locales.php b/modules/gallery/helpers/locales.php
index d1e72260..565e9da8 100644
--- a/modules/gallery/helpers/locales.php
+++ b/modules/gallery/helpers/locales.php
@@ -62,11 +62,14 @@ class locales_Core {
}
// @todo Might want to add a localizable language name as well.
+ // ref: http://cldr.unicode.org/
+ // ref: http://cldr.unicode.org/index/cldr-spec/picking-the-right-language-code
private static function _init_language_data() {
$l["af_ZA"] = "Afrikaans"; // Afrikaans
$l["ar_SA"] = "العربية"; // Arabic
$l["be_BY"] = "Беларускі"; // Belarusian
$l["bg_BG"] = "български"; // Bulgarian
+ $l["bn_BD"] = "বাংলা"; // Bengali
$l["ca_ES"] = "Catalan"; // Catalan
$l["cs_CZ"] = "čeština"; // Czech
$l["da_DK"] = "Dansk"; // Danish
@@ -92,6 +95,7 @@ class locales_Core {
$l["ko_KR"] = "한국어"; // Korean
$l["lt_LT"] = "Lietuvių"; // Lithuanian
$l["lv_LV"] = "Latviešu"; // Latvian
+ $l["ms_MY"] = "Bahasa Melayu"; // Malay
$l["mk_MK"] = "Македонски јазик"; // Macedonian
$l["nl_NL"] = "Nederlands"; // Dutch
$l["no_NO"] = "Norsk bokmål"; // Norwegian
@@ -208,7 +212,7 @@ class locales_Core {
}
private static function _locale_match_score($requested_locale, $qvalue, $adjustment_factor) {
- $installed = self::installed();
+ $installed = locales::installed();
if (isset($installed[$requested_locale])) {
return array($requested_locale, $qvalue);
}
@@ -223,14 +227,14 @@ class locales_Core {
static function set_request_locale() {
// 1. Check the session specific preference (cookie)
- $locale = self::cookie_locale();
+ $locale = locales::cookie_locale();
// 2. Check the user's preference
if (!$locale) {
$locale = identity::active_user()->locale;
}
// 3. Check the browser's / OS' preference
if (!$locale) {
- $locale = self::locale_from_http_request();
+ $locale = locales::locale_from_http_request();
}
// If we have any preference, override the site's default locale
if ($locale) {