Skip to content

List of All Locales and Their Short Codes?

PHP does not ship with a built-in, exhaustive list of locales. Locale availability depends on the intl extension and the underlying operating system. Below is a partial example of how locale codes and their display names are typically structured in PHP:

Example Locale Array Structure

php
<?php
$locales = [
    "af" => "Afrikaans",
    "af_ZA" => "Afrikaans (South Africa)",
    "ar" => "Arabic",
    "ar_AE" => "Arabic (U.A.E.)",
    "ar_BH" => "Arabic (Bahrain)",
    "ar_DZ" => "Arabic (Algeria)",
    "ar_EG" => "Arabic (Egypt)",
    "ar_IQ" => "Arabic (Iraq)",
    "ar_JO" => "Arabic (Jordan)",
    "ar_KW" => "Arabic (Kuwait)",
    "ar_LB" => "Arabic (Lebanon)",
    "ar_LY" => "Arabic (Libya)",
    "ar_MA" => "Arabic (Morocco)",
    "ar_OM" => "Arabic (Oman)",
    "ar_QA" => "Arabic (Qatar)",
    "ar_SA" => "Arabic (Saudi Arabia)",
    "ar_SY" => "Arabic (Syria)",
    "ar_TN" => "Arabic (Tunisia)",
    "ar_YE" => "Arabic (Yemen)",
    "az" => "Azerbaijani",
    "az_AZ" => "Azerbaijani (Azerbaijan)",
    "be" => "Belarusian",
    "be_BY" => "Belarusian (Belarus)",
    "bg" => "Bulgarian",
    "bg_BG" => "Bulgarian (Bulgaria)",
    "bn" => "Bengali",
    "bn_BD" => "Bengali (Bangladesh)",
    "bn_IN" => "Bengali (India)",
    "bo" => "Tibetan",
    "bo_CN" => "Tibetan (China)",
    "bo_IN" => "Tibetan (India)",
    "bs" => "Bosnian",
    "bs_BA" => "Bosnian (Bosnia and Herzegovina)",
    "ca" => "Catalan",
    "ca_ES" => "Catalan (Spain)",
    "cs" => "Czech",
    "cs_CZ" => "Czech (Czech Republic)",
    "cy" => "Welsh",
    "cy_GB" => "Welsh (United Kingdom)",
    "da" => "Danish",
    "da_DK" => "Danish (Denmark)",
    "de" => "German",
    "de_AT" => "German (Austria)",
    "de_CH" => "German (Switzerland)",
    "de_DE" => "German (Germany)",
    "de_LU" => "German (Luxembourg)",
    "dz" => "Dzongkha",
    "dz_BT" => "Dzongkha (Bhutan)",
    "el" => "Greek",
    "el_CY" => "Greek (Cyprus)",
    "el_GR" => "Greek (Greece)",
    "en" => "English",
    "en_AU" => "English (Australia)",
    "en_CA" => "English (Canada)",
    "en_GB" => "English (United Kingdom)",
    "en_IE" => "English (Ireland)",
];
?>

<div class="alert alert-info flex not-prose"> Watch a course Learn object oriented PHP</div>

Do you find this helpful?

Dual-run preview — compare with live Symfony routes.