本文整理汇总了PHP中l10n::langs方法的典型用法代码示例。如果您正苦于以下问题:PHP l10n::langs方法的具体用法?PHP l10n::langs怎么用?PHP l10n::langs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类l10n
的用法示例。
在下文中一共展示了l10n::langs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getISOcodes
/**
* ISO Codes
*
* Returns an array predefined languages ISO codes as you can find on
* {@link http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes}
* The list as additionnal IETF codes as pt-br.
*
* @param boolean $flip Flip resulting array
* @param boolean $name_with_code Prefix (code) to names
* @return array
*/
public static function getISOcodes($flip = false, $name_with_code = false)
{
if (empty(self::$langs)) {
self::$langs = array('aa' => 'Afaraf', 'ab' => 'Аҧсуа', 'ae' => 'avesta', 'af' => 'Afrikaans', 'ak' => 'Akan', 'am' => 'አማርኛ', 'an' => 'Aragonés', 'ar' => 'العربية', 'as' => 'অসমীয়া', 'av' => 'авар мацӀ', 'ay' => 'aymar aru', 'az' => 'azərbaycan dili', 'ba' => 'башҡорт теле', 'be' => 'Беларуская', 'bg' => 'български език', 'bh' => 'भोजपुरी', 'bi' => 'Bislama', 'bm' => 'bamanankan', 'bn' => 'বাংলা', 'bo' => 'བོད་ཡིག', 'br' => 'brezhoneg', 'bs' => 'bosanski jezik', 'ca' => 'Català', 'ce' => 'нохчийн мотт', 'ch' => 'Chamoru', 'co' => 'corsu', 'cr' => 'ᓀᐦᐃᔭᐍᐏᐣ', 'cs' => 'česky', 'cu' => 'ѩзыкъ словѣньскъ', 'cv' => 'чӑваш чӗлхи', 'cy' => 'Cymraeg', 'da' => 'dansk', 'de' => 'Deutsch', 'dv' => 'ދިވެހި', 'dz' => 'རྫོང་ཁ', 'ee' => 'Ɛʋɛgbɛ', 'el' => 'Ελληνικά', 'en' => 'English', 'eo' => 'Esperanto', 'es' => 'español', 'et' => 'Eesti keel', 'eu' => 'euskara', 'fa' => 'فارسی', 'ff' => 'Fulfulde', 'fi' => 'suomen kieli', 'fj' => 'vosa Vakaviti', 'fo' => 'Føroyskt', 'fr' => 'français', 'fy' => 'Frysk', 'ga' => 'Gaeilge', 'gd' => 'Gàidhlig', 'gl' => 'Galego', 'gn' => "Avañe'ẽ", 'gu' => 'ગુજરાતી', 'gv' => 'Ghaelg', 'ha' => 'هَوُسَ', 'he' => 'עברית', 'hi' => 'हिन्दी', 'ho' => 'Hiri Motu', 'hr' => 'Hrvatski', 'ht' => 'Kreyòl ayisyen', 'hu' => 'Magyar', 'hy' => 'Հայերեն', 'hz' => 'Otjiherero', 'ia' => 'Interlingua', 'id' => 'Bahasa Indonesia', 'ie' => 'Interlingue', 'ig' => 'Igbo', 'ii' => 'ꆇꉙ', 'ik' => 'Iñupiaq', 'io' => 'Ido', 'is' => 'Íslenska', 'it' => 'Italiano', 'iu' => 'ᐃᓄᒃᑎᑐᑦ', 'ja' => '日本語', 'jv' => 'basa Jawa', 'ka' => 'ქართული', 'kg' => 'KiKongo', 'ki' => 'Gĩkũyũ', 'kj' => 'Kuanyama', 'kk' => 'Қазақ тілі', 'kl' => 'kalaallisut', 'km' => 'ភាសាខ្មែរ', 'kn' => 'ಕನ್ನಡ', 'ko' => '한국어', 'kr' => 'Kanuri', 'ks' => 'कश्मीरी', 'ku' => 'Kurdî', 'kv' => 'коми кыв', 'kw' => 'Kernewek', 'ky' => 'кыргыз тили', 'la' => 'latine', 'lb' => 'Lëtzebuergesch', 'lg' => 'Luganda', 'li' => 'Limburgs', 'ln' => 'Lingála', 'lo' => 'ພາສາລາວ', 'lt' => 'lietuvių kalba', 'lu' => 'Luba-Katanga ', 'lv' => 'latviešu valoda', 'mg' => 'Malagasy fiteny', 'mh' => 'Kajin M̧ajeļ', 'mi' => 'te reo Māori', 'mk' => 'македонски јазик', 'ml' => 'മലയാളം', 'mn' => 'Монгол', 'mo' => 'Limba moldovenească', 'mr' => 'मराठी', 'ms' => 'bahasa Melayu', 'mt' => 'Malti', 'my' => 'ဗမာစာ', 'na' => 'Ekakairũ Naoero', 'nb' => 'Norsk bokmål', 'nd' => 'isiNdebele', 'ne' => 'नेपाली', 'ng' => 'Owambo', 'nl' => 'Nederlands', 'nl-be' => 'Nederlands (Belgium)', 'nn' => 'Norsk nynorsk', 'no' => 'Norsk', 'nr' => 'Ndébélé', 'nv' => 'Diné bizaad', 'ny' => 'chiCheŵa', 'oc' => 'Occitan', 'oj' => 'ᐊᓂᔑᓈᐯᒧᐎᓐ', 'om' => 'Afaan Oromoo', 'or' => 'ଓଡ଼ିଆ', 'os' => 'Ирон æвзаг', 'pa' => 'ਪੰਜਾਬੀ', 'pi' => 'पाऴि', 'pl' => 'polski', 'ps' => 'پښتو', 'pt' => 'Português', 'pt-br' => 'Português (Brasil)', 'qu' => 'Runa Simi', 'rm' => 'rumantsch grischun', 'rn' => 'kiRundi', 'ro' => 'română', 'ru' => 'Русский', 'rw' => 'Ikinyarwanda', 'sa' => 'संस्कृतम्', 'sc' => 'sardu', 'sd' => 'सिन्धी', 'se' => 'Davvisámegiella', 'sg' => 'yângâ tî sängö', 'sh' => 'Srpskohrvatski', 'si' => 'සිංහල', 'sk' => 'slovenčina', 'sl' => 'slovenščina', 'sm' => "gagana fa'a Samoa", 'sn' => 'chiShona', 'so' => 'Soomaaliga', 'sq' => 'Shqip', 'sr' => 'српски језик', 'ss' => 'SiSwati', 'st' => 'seSotho', 'su' => 'Basa Sunda', 'sv' => 'Svenska', 'sw' => 'Kiswahili', 'ta' => 'தமிழ்', 'te' => 'తెలుగు', 'tg' => 'тоҷикӣ', 'th' => 'ไทย', 'ti' => 'ትግርኛ', 'tk' => 'Türkmen', 'tl' => 'Tagalog', 'tn' => 'seTswana', 'to' => 'faka Tonga', 'tr' => 'Türkçe', 'ts' => 'xiTsonga', 'tt' => 'татарча', 'tw' => 'Twi', 'ty' => 'Reo Mā`ohi', 'ug' => 'Uyƣurqə', 'uk' => 'Українська', 'ur' => 'اردو', 'uz' => "O'zbek", 've' => 'tshiVenḓa', 'vi' => 'Tiếng Việt', 'vo' => 'Volapük', 'wa' => 'Walon', 'wo' => 'Wollof', 'xh' => 'isiXhosa', 'yi' => 'ייִדיש', 'yo' => 'Yorùbá', 'za' => 'Saɯ cueŋƅ', 'zh' => '中文', 'zh-hk' => '中文 (香港)', 'zh-tw' => '中文 (臺灣)', 'zu' => 'isiZulu');
}
$langs = self::$langs;
if ($name_with_code) {
foreach ($langs as $k => &$v) {
$v = '(' . $k . ') ' . $v;
}
}
if ($flip) {
return array_flip($langs);
}
return $langs;
}