format_code_lang() – Returns the language for a language code.

You appear to be a bot. Output may be restricted

Description

Returns the language for a language code.

Usage

$string = format_code_lang( $code );

Parameters

$code
( string ) optional – Optional. The two-letter language code. Default empty.

Returns

string The language corresponding to $code if it exists. If it does not exist, then the first two letters of $code is returned.

Source

File name: wordpress/wp-admin/includes/ms.php
Lines:

1 to 100 of 201
function format_code_lang( $code = '' ) {
  $code       = strtolower( substr( $code, 0, 2 ) );
  $lang_codes = array(
    'aa' => 'Afar',
    'ab' => 'Abkhazian',
    'af' => 'Afrikaans',
    'ak' => 'Akan',
    'sq' => 'Albanian',
    'am' => 'Amharic',
    'ar' => 'Arabic',
    'an' => 'Aragonese',
    'hy' => 'Armenian',
    'as' => 'Assamese',
    'av' => 'Avaric',
    'ae' => 'Avestan',
    'ay' => 'Aymara',
    'az' => 'Azerbaijani',
    'ba' => 'Bashkir',
    'bm' => 'Bambara',
    'eu' => 'Basque',
    'be' => 'Belarusian',
    'bn' => 'Bengali',
    'bh' => 'Bihari',
    'bi' => 'Bislama',
    'bs' => 'Bosnian',
    'br' => 'Breton',
    'bg' => 'Bulgarian',
    'my' => 'Burmese',
    'ca' => 'Catalan; Valencian',
    'ch' => 'Chamorro',
    'ce' => 'Chechen',
    'zh' => 'Chinese',
    'cu' => 'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic',
    'cv' => 'Chuvash',
    'kw' => 'Cornish',
    'co' => 'Corsican',
    'cr' => 'Cree',
    'cs' => 'Czech',
    'da' => 'Danish',
    'dv' => 'Divehi; Dhivehi; Maldivian',
    'nl' => 'Dutch; Flemish',
    'dz' => 'Dzongkha',
    'en' => 'English',
    'eo' => 'Esperanto',
    'et' => 'Estonian',
    'ee' => 'Ewe',
    'fo' => 'Faroese',
    'fj' => 'Fijjian',
    'fi' => 'Finnish',
    'fr' => 'French',
    'fy' => 'Western Frisian',
    'ff' => 'Fulah',
    'ka' => 'Georgian',
    'de' => 'German',
    'gd' => 'Gaelic; Scottish Gaelic',
    'ga' => 'Irish',
    'gl' => 'Galician',
    'gv' => 'Manx',
    'el' => 'Greek, Modern',
    'gn' => 'Guarani',
    'gu' => 'Gujarati',
    'ht' => 'Haitian; Haitian Creole',
    'ha' => 'Hausa',
    'he' => 'Hebrew',
    'hz' => 'Herero',
    'hi' => 'Hindi',
    'ho' => 'Hiri Motu',
    'hu' => 'Hungarian',
    'ig' => 'Igbo',
    'is' => 'Icelandic',
    'io' => 'Ido',
    'ii' => 'Sichuan Yi',
    'iu' => 'Inuktitut',
    'ie' => 'Interlingue',
    'ia' => 'Interlingua (International Auxiliary Language Association)',
    'id' => 'Indonesian',
    'ik' => 'Inupiaq',
    'it' => 'Italian',
    'jv' => 'Javanese',
    'ja' => 'Japanese',
    'kl' => 'Kalaallisut; Greenlandic',
    'kn' => 'Kannada',
    'ks' => 'Kashmiri',
    'kr' => 'Kanuri',
    'kk' => 'Kazakh',
    'km' => 'Central Khmer',
    'ki' => 'Kikuyu; Gikuyu',
    'rw' => 'Kinyarwanda',
    'ky' => 'Kirghiz; Kyrgyz',
    'kv' => 'Komi',
    'kg' => 'Kongo',
    'ko' => 'Korean',
    'kj' => 'Kuanyama; Kwanyama',
    'ku' => 'Kurdish',
    'lo' => 'Lao',
    'la' => 'Latin',
    'lv' => 'Latvian',
    'li' => 'Limburgan; Limburger; Limburgish',
    'ln' => 'Lingala',
    'lt' => 'Lithuanian',
 

 View on GitHub View on Trac