public function csl_locale::get_locales_file_name in Bibliography Module 7
Same name and namespace in other branches
- 6.2 modules/CiteProc/CSL.inc \csl_locale::get_locales_file_name()
- 7.2 modules/CiteProc/CSL.inc \csl_locale::get_locales_file_name()
1 call to csl_locale::get_locales_file_name()
- csl_locale::__construct in modules/
CiteProc/ CSL.inc
File
- modules/
CiteProc/ CSL.inc, line 2091 - CiteProc-PHP.
Class
Code
public function get_locales_file_name($lang) {
$lang_bases = array(
"af" => "af-ZA",
"ar" => "ar-AR",
"bg" => "bg-BG",
"ca" => "ca-AD",
"cs" => "cs-CZ",
"da" => "da-DK",
"de" => "de-DE",
"el" => "el-GR",
"en" => "en-US",
"es" => "es-ES",
"et" => "et-EE",
"fa" => "fa-IR",
"fi" => "fi-FI",
"fr" => "fr-FR",
"he" => "he-IL",
"hu" => "hu-HU",
"is" => "is-IS",
"it" => "it-IT",
"ja" => "ja-JP",
"km" => "km-KH",
"ko" => "ko-KR",
"mn" => "mn-MN",
"nb" => "nb-NO",
"nl" => "nl-NL",
"nn" => "nn-NO",
"pl" => "pl-PL",
"pt" => "pt-PT",
"ro" => "ro-RO",
"ru" => "ru-RU",
"sk" => "sk-SK",
"sl" => "sl-SI",
"sr" => "sr-RS",
"sv" => "sv-SE",
"th" => "th-TH",
"tr" => "tr-TR",
"uk" => "uk-UA",
"vi" => "vi-VN",
"zh" => "zh-CN",
);
return isset($lang_bases[$lang]) ? file_get_contents($this->module_path . '/locale/locales-' . $lang_bases[$lang] . '.xml') : file_get_contents($this->module_path . '/locale/locales-en-US.xml');
}