List of All Locales and Their Short Codes? - Stack Overflow
文章推薦指數: 80 %
List of all languages with names and ISO 639-1 codes in all languages and all data formats. Formats Available. Text; JSON; YAML; XML; HTML; CSV; SQL (MySQL, ...
Home
Public
Questions
Tags
Users
Collectives
ExploreCollectives
FindaJob
Jobs
Companies
Teams
StackOverflowforTeams
–Collaborateandshareknowledgewithaprivategroup.
CreateafreeTeam
WhatisTeams?
Teams
CreatefreeTeam
CollectivesonStackOverflow
Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost.
Learnmore
Teams
Q&Aforwork
Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch.
Learnmore
ListofAllLocalesandTheirShortCodes?
AskQuestion
Asked
11years,5monthsago
Active
9daysago
Viewed
446ktimes
308
113
I'mlookingforalistofalllocalesandtheirshortcodesforaPHPapplicationIamwriting.Istheremuchvariationinthisdatabetweenplatforms?
Also,ifIamdevelopinganinternationalapplication,canIjustsupportoneversionofEnglishoraretheresignificantdifferencesinEnglishacrosstheworld?
phpinternationalizationlocale
Share
Follow
editedJul7'10at3:31
KirkOuimet
askedJul7'10at3:19
KirkOuimetKirkOuimet
24.8k4343goldbadges113113silverbadges165165bronzebadges
7
1
There'ssignificantformattingdifferences,esp.fordate&time,intheEnglishvarients.Alsomanydifferencesinspellingandoccasionallyterminology,esp.betweenGB&US.
– Pete
Jul7'10at4:41
3
Havingawholelistisofnouse.Youcanuseonlythoselocalesthatareinstalledonthesystem.Findoutwhatlocalesareinstalled.Uselocale-acommandonLinux.
– SilverMoon
Apr15'12at10:49
Related:stackoverflow.com/a/13269403/328817
– Sam
Oct6'14at10:15
2
Thetwoprinciplevariantsofentouseareen_USanden_GB,withthemaindifferencesbeingthatthelattergenerallyusesiseinsteadoftheformer'size,andtheoriginalFrenchspellingsofwordslikemetre,insteadofmeter,anddonotusephoneticcontractions,byusingsulphurinsteadofsulphur.en_GBwillusuallycoverthespellingconventionsusedinformercoloniesthathaven'tbeenculturallydominatedbytheUS,likeen_AUanden_NZ.Seetysto.com/uk-us-spelling-list.html.
– Patanjali
Jan27'17at15:29
1
Unlessreallyrequiredtocaterforlocalpreferences,becauseyourparticularaudiencetendstoactivelyresist'foreign'spellings,oryouarecateringtotheworld,andyourusersknowit,usingen_USasasoleenlocalewillnotruffletoomanyfeathers.
– Patanjali
Jan27'17at15:36
|
Show2morecomments
9Answers
9
Active
Oldest
Votes
331
Theimportanceoflocalesisthatyourenvironment/oscanprovideformattingfunctionalityforallinstalledlocalesevenifyoudon'tknowaboutthemwhenyouwriteyourapplication.MyWindows7systemhas211localesinstalled(listedbelow),soyouwouldn'tlikelywriteanycustomcodeortranslationspecifictothismanylocales.
Edit:Theoriginallistoflocaleshasbeeneditedtoaddadditionallocalesthatwerenotincludedbefore.Now228listed.
ThemostimportantthingforvariousversionsofEnglishisinformattingnumbersanddates.Otherdifferencesaresignificanttotheextentthatyouwantandabletocatertospecificvariations.
af-ZA
am-ET
ar-AE
ar-BH
ar-DZ
ar-EG
ar-IQ
ar-JO
ar-KW
ar-LB
ar-LY
ar-MA
arn-CL
ar-OM
ar-QA
ar-SA
ar-SD
ar-SY
ar-TN
ar-YE
as-IN
az-az
az-Cyrl-AZ
az-Latn-AZ
ba-RU
be-BY
bg-BG
bn-BD
bn-IN
bo-CN
br-FR
bs-Cyrl-BA
bs-Latn-BA
ca-ES
co-FR
cs-CZ
cy-GB
da-DK
de-AT
de-CH
de-DE
de-LI
de-LU
dsb-DE
dv-MV
el-CY
el-GR
en-029
en-AU
en-BZ
en-CA
en-cb
en-GB
en-IE
en-IN
en-JM
en-MT
en-MY
en-NZ
en-PH
en-SG
en-TT
en-US
en-ZA
en-ZW
es-AR
es-BO
es-CL
es-CO
es-CR
es-DO
es-EC
es-ES
es-GT
es-HN
es-MX
es-NI
es-PA
es-PE
es-PR
es-PY
es-SV
es-US
es-UY
es-VE
et-EE
eu-ES
fa-IR
fi-FI
fil-PH
fo-FO
fr-BE
fr-CA
fr-CH
fr-FR
fr-LU
fr-MC
fy-NL
ga-IE
gd-GB
gd-ie
gl-ES
gsw-FR
gu-IN
ha-Latn-NG
he-IL
hi-IN
hr-BA
hr-HR
hsb-DE
hu-HU
hy-AM
id-ID
ig-NG
ii-CN
in-ID
is-IS
it-CH
it-IT
iu-Cans-CA
iu-Latn-CA
iw-IL
ja-JP
ka-GE
kk-KZ
kl-GL
km-KH
kn-IN
kok-IN
ko-KR
ky-KG
lb-LU
lo-LA
lt-LT
lv-LV
mi-NZ
mk-MK
ml-IN
mn-MN
mn-Mong-CN
moh-CA
mr-IN
ms-BN
ms-MY
mt-MT
nb-NO
ne-NP
nl-BE
nl-NL
nn-NO
no-no
nso-ZA
oc-FR
or-IN
pa-IN
pl-PL
prs-AF
ps-AF
pt-BR
pt-PT
qut-GT
quz-BO
quz-EC
quz-PE
rm-CH
ro-mo
ro-RO
ru-mo
ru-RU
rw-RW
sah-RU
sa-IN
se-FI
se-NO
se-SE
si-LK
sk-SK
sl-SI
sma-NO
sma-SE
smj-NO
smj-SE
smn-FI
sms-FI
sq-AL
sr-BA
sr-CS
sr-Cyrl-BA
sr-Cyrl-CS
sr-Cyrl-ME
sr-Cyrl-RS
sr-Latn-BA
sr-Latn-CS
sr-Latn-ME
sr-Latn-RS
sr-ME
sr-RS
sr-sp
sv-FI
sv-SE
sw-KE
syr-SY
ta-IN
te-IN
tg-Cyrl-TJ
th-TH
tk-TM
tlh-QS
tn-ZA
tr-TR
tt-RU
tzm-Latn-DZ
ug-CN
uk-UA
ur-PK
uz-Cyrl-UZ
uz-Latn-UZ
uz-uz
vi-VN
wo-SN
xh-ZA
yo-NG
zh-CN
zh-HK
zh-MO
zh-SG
zh-TW
zu-ZA
Share
Follow
editedDec14at16:35
answeredJul7'10at3:37
SamuelNeffSamuelNeff
69.5k1616goldbadges129129silverbadges173173bronzebadges
7
1
ThesearebesthandledbyusingMessageFormatter::formatMessage,oritsone-off,msgfmt_format_message,asinmsgfmt_format_message('ar-ye','{0,date,medium}',array('2017-01-27)),whichwillproduce٢٧/٠١/٢٠١٧.Fortimes,whereusingvaluesstoredasUTC,itisprobablybettertousetheIntlDateFormatterclass,asyoucanputinatimezonetoshowthelocaltimeinthelanguage.
– Patanjali
Jan27'17at16:12
3
Foranyoneelsewonderingwhaten-029is,it'sEnglish(Caribbean):stackoverflow.com/questions/7192410/…
– Boris
Mar12'20at23:05
tlh-AQKlingon-speakersinAntarctica,reprezent!
– Mentalist
Dec8at5:24
@Mentalist,thankyouforpointingouttheomission!!I'llgladlyeditandadditbutcanyouprovideanofficiallinktoconfirmthefullcode,tlh-AQ?Iwasabletovalidatetlhbutdidnt'seeanythingreferencingtheAQpart.Ionlylookedbriefly.
– SamuelNeff
Dec10at18:11
1
@Mentalistoic.Yes,anylanguage+regioncombinationcouldbecreated,butonlythosethatactuallyhavedifferentregionaldialectsmakesense?ja-JPvsja-USwouldnotmakesensesinceUSdoesnothavearegionalJapanesevariant.ForKlingonI'monlyawareofoneregion,Qo'noS(QS)?Iupdatedthelistabove.Thatsaid,therearealotofveryobscureandconstructedlanguagesnotincludedintheabovelist.
– SamuelNeff
Dec14at16:34
|
Show2morecomments
230
Theacceptedanswermissessomerathersignificantlocales.Forexample,theChineselocalesdon'tdistinguishbetweenthedifferentscriptures(simplifiedhan,traditionalhan).What'samain-landChinesecitizenwhowantstraditionalhansupposedtouse-theHongKongsetting?
I'vetakenthislistofiOSlocales,removedthestrangePOSIXentry,formatteditasJavascriptandsorteditbyvalue(soifyouuseanorderedobjectimplementationandcreatealistbygoingthroughthekeysandreturningthevalue,itwillshowthehumanreadabletextincorrectorder).Also,thislistbothcontainsamainentryperlanguageaswellasalltheregionspecificvariants-thiswayyoualwayshaveadesignatedfallbackoption,sayifyourinterfacehasonlydefinedthe'en'option-youwouldn'totherwiseknowonwhattofallbackonreliably.
varLANGUAGE_BY_LOCALE={
af_NA:"Afrikaans(Namibia)",
af_ZA:"Afrikaans(SouthAfrica)",
af:"Afrikaans",
ak_GH:"Akan(Ghana)",
ak:"Akan",
sq_AL:"Albanian(Albania)",
sq:"Albanian",
am_ET:"Amharic(Ethiopia)",
am:"Amharic",
ar_DZ:"Arabic(Algeria)",
ar_BH:"Arabic(Bahrain)",
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(SaudiArabia)",
ar_SD:"Arabic(Sudan)",
ar_SY:"Arabic(Syria)",
ar_TN:"Arabic(Tunisia)",
ar_AE:"Arabic(UnitedArabEmirates)",
ar_YE:"Arabic(Yemen)",
ar:"Arabic",
hy_AM:"Armenian(Armenia)",
hy:"Armenian",
as_IN:"Assamese(India)",
as:"Assamese",
asa_TZ:"Asu(Tanzania)",
asa:"Asu",
az_Cyrl:"Azerbaijani(Cyrillic)",
az_Cyrl_AZ:"Azerbaijani(Cyrillic,Azerbaijan)",
az_Latn:"Azerbaijani(Latin)",
az_Latn_AZ:"Azerbaijani(Latin,Azerbaijan)",
az:"Azerbaijani",
bm_ML:"Bambara(Mali)",
bm:"Bambara",
eu_ES:"Basque(Spain)",
eu:"Basque",
be_BY:"Belarusian(Belarus)",
be:"Belarusian",
bem_ZM:"Bemba(Zambia)",
bem:"Bemba",
bez_TZ:"Bena(Tanzania)",
bez:"Bena",
bn_BD:"Bengali(Bangladesh)",
bn_IN:"Bengali(India)",
bn:"Bengali",
bs_BA:"Bosnian(BosniaandHerzegovina)",
bs:"Bosnian",
bg_BG:"Bulgarian(Bulgaria)",
bg:"Bulgarian",
my_MM:"Burmese(Myanmar[Burma])",
my:"Burmese",
yue_Hant_HK:"Cantonese(Traditional,HongKongSARChina)",
ca_ES:"Catalan(Spain)",
ca:"Catalan",
tzm_Latn:"CentralMoroccoTamazight(Latin)",
tzm_Latn_MA:"CentralMoroccoTamazight(Latin,Morocco)",
tzm:"CentralMoroccoTamazight",
chr_US:"Cherokee(UnitedStates)",
chr:"Cherokee",
cgg_UG:"Chiga(Uganda)",
cgg:"Chiga",
zh_Hans:"Chinese(SimplifiedHan)",
zh_Hans_CN:"Chinese(SimplifiedHan,China)",
zh_Hans_HK:"Chinese(SimplifiedHan,HongKongSARChina)",
zh_Hans_MO:"Chinese(SimplifiedHan,MacauSARChina)",
zh_Hans_SG:"Chinese(SimplifiedHan,Singapore)",
zh_Hant:"Chinese(TraditionalHan)",
zh_Hant_HK:"Chinese(TraditionalHan,HongKongSARChina)",
zh_Hant_MO:"Chinese(TraditionalHan,MacauSARChina)",
zh_Hant_TW:"Chinese(TraditionalHan,Taiwan)",
zh:"Chinese",
kw_GB:"Cornish(UnitedKingdom)",
kw:"Cornish",
hr_HR:"Croatian(Croatia)",
hr:"Croatian",
cs_CZ:"Czech(CzechRepublic)",
cs:"Czech",
da_DK:"Danish(Denmark)",
da:"Danish",
nl_BE:"Dutch(Belgium)",
nl_NL:"Dutch(Netherlands)",
nl:"Dutch",
ebu_KE:"Embu(Kenya)",
ebu:"Embu",
en_AS:"English(AmericanSamoa)",
en_AU:"English(Australia)",
en_BE:"English(Belgium)",
en_BZ:"English(Belize)",
en_BW:"English(Botswana)",
en_CA:"English(Canada)",
en_GU:"English(Guam)",
en_HK:"English(HongKongSARChina)",
en_IN:"English(India)",
en_IE:"English(Ireland)",
en_IL:"English(Israel)",
en_JM:"English(Jamaica)",
en_MT:"English(Malta)",
en_MH:"English(MarshallIslands)",
en_MU:"English(Mauritius)",
en_NA:"English(Namibia)",
en_NZ:"English(NewZealand)",
en_MP:"English(NorthernMarianaIslands)",
en_PK:"English(Pakistan)",
en_PH:"English(Philippines)",
en_SG:"English(Singapore)",
en_ZA:"English(SouthAfrica)",
en_TT:"English(TrinidadandTobago)",
en_UM:"English(U.S.MinorOutlyingIslands)",
en_VI:"English(U.S.VirginIslands)",
en_GB:"English(UnitedKingdom)",
en_US:"English(UnitedStates)",
en_ZW:"English(Zimbabwe)",
en:"English",
eo:"Esperanto",
et_EE:"Estonian(Estonia)",
et:"Estonian",
ee_GH:"Ewe(Ghana)",
ee_TG:"Ewe(Togo)",
ee:"Ewe",
fo_FO:"Faroese(FaroeIslands)",
fo:"Faroese",
fil_PH:"Filipino(Philippines)",
fil:"Filipino",
fi_FI:"Finnish(Finland)",
fi:"Finnish",
fr_BE:"French(Belgium)",
fr_BJ:"French(Benin)",
fr_BF:"French(BurkinaFaso)",
fr_BI:"French(Burundi)",
fr_CM:"French(Cameroon)",
fr_CA:"French(Canada)",
fr_CF:"French(CentralAfricanRepublic)",
fr_TD:"French(Chad)",
fr_KM:"French(Comoros)",
fr_CG:"French(Congo-Brazzaville)",
fr_CD:"French(Congo-Kinshasa)",
fr_CI:"French(Côted’Ivoire)",
fr_DJ:"French(Djibouti)",
fr_GQ:"French(EquatorialGuinea)",
fr_FR:"French(France)",
fr_GA:"French(Gabon)",
fr_GP:"French(Guadeloupe)",
fr_GN:"French(Guinea)",
fr_LU:"French(Luxembourg)",
fr_MG:"French(Madagascar)",
fr_ML:"French(Mali)",
fr_MQ:"French(Martinique)",
fr_MC:"French(Monaco)",
fr_NE:"French(Niger)",
fr_RW:"French(Rwanda)",
fr_RE:"French(Réunion)",
fr_BL:"French(SaintBarthélemy)",
fr_MF:"French(SaintMartin)",
fr_SN:"French(Senegal)",
fr_CH:"French(Switzerland)",
fr_TG:"French(Togo)",
fr:"French",
ff_SN:"Fulah(Senegal)",
ff:"Fulah",
gl_ES:"Galician(Spain)",
gl:"Galician",
lg_UG:"Ganda(Uganda)",
lg:"Ganda",
ka_GE:"Georgian(Georgia)",
ka:"Georgian",
de_AT:"German(Austria)",
de_BE:"German(Belgium)",
de_DE:"German(Germany)",
de_LI:"German(Liechtenstein)",
de_LU:"German(Luxembourg)",
de_CH:"German(Switzerland)",
de:"German",
el_CY:"Greek(Cyprus)",
el_GR:"Greek(Greece)",
el:"Greek",
gu_IN:"Gujarati(India)",
gu:"Gujarati",
guz_KE:"Gusii(Kenya)",
guz:"Gusii",
ha_Latn:"Hausa(Latin)",
ha_Latn_GH:"Hausa(Latin,Ghana)",
ha_Latn_NE:"Hausa(Latin,Niger)",
ha_Latn_NG:"Hausa(Latin,Nigeria)",
ha:"Hausa",
haw_US:"Hawaiian(UnitedStates)",
haw:"Hawaiian",
he_IL:"Hebrew(Israel)",
he:"Hebrew",
hi_IN:"Hindi(India)",
hi:"Hindi",
hu_HU:"Hungarian(Hungary)",
hu:"Hungarian",
is_IS:"Icelandic(Iceland)",
is:"Icelandic",
ig_NG:"Igbo(Nigeria)",
ig:"Igbo",
id_ID:"Indonesian(Indonesia)",
id:"Indonesian",
ga_IE:"Irish(Ireland)",
ga:"Irish",
it_IT:"Italian(Italy)",
it_CH:"Italian(Switzerland)",
it:"Italian",
ja_JP:"Japanese(Japan)",
ja:"Japanese",
kea_CV:"Kabuverdianu(CapeVerde)",
kea:"Kabuverdianu",
kab_DZ:"Kabyle(Algeria)",
kab:"Kabyle",
kl_GL:"Kalaallisut(Greenland)",
kl:"Kalaallisut",
kln_KE:"Kalenjin(Kenya)",
kln:"Kalenjin",
kam_KE:"Kamba(Kenya)",
kam:"Kamba",
kn_IN:"Kannada(India)",
kn:"Kannada",
kk_Cyrl:"Kazakh(Cyrillic)",
kk_Cyrl_KZ:"Kazakh(Cyrillic,Kazakhstan)",
kk:"Kazakh",
km_KH:"Khmer(Cambodia)",
km:"Khmer",
ki_KE:"Kikuyu(Kenya)",
ki:"Kikuyu",
rw_RW:"Kinyarwanda(Rwanda)",
rw:"Kinyarwanda",
kok_IN:"Konkani(India)",
kok:"Konkani",
ko_KR:"Korean(SouthKorea)",
ko:"Korean",
khq_ML:"KoyraChiini(Mali)",
khq:"KoyraChiini",
ses_ML:"KoyraboroSenni(Mali)",
ses:"KoyraboroSenni",
lag_TZ:"Langi(Tanzania)",
lag:"Langi",
lv_LV:"Latvian(Latvia)",
lv:"Latvian",
lt_LT:"Lithuanian(Lithuania)",
lt:"Lithuanian",
luo_KE:"Luo(Kenya)",
luo:"Luo",
luy_KE:"Luyia(Kenya)",
luy:"Luyia",
mk_MK:"Macedonian(Macedonia)",
mk:"Macedonian",
jmc_TZ:"Machame(Tanzania)",
jmc:"Machame",
kde_TZ:"Makonde(Tanzania)",
kde:"Makonde",
mg_MG:"Malagasy(Madagascar)",
mg:"Malagasy",
ms_BN:"Malay(Brunei)",
ms_MY:"Malay(Malaysia)",
ms:"Malay",
ml_IN:"Malayalam(India)",
ml:"Malayalam",
mt_MT:"Maltese(Malta)",
mt:"Maltese",
gv_GB:"Manx(UnitedKingdom)",
gv:"Manx",
mr_IN:"Marathi(India)",
mr:"Marathi",
mas_KE:"Masai(Kenya)",
mas_TZ:"Masai(Tanzania)",
mas:"Masai",
mer_KE:"Meru(Kenya)",
mer:"Meru",
mfe_MU:"Morisyen(Mauritius)",
mfe:"Morisyen",
naq_NA:"Nama(Namibia)",
naq:"Nama",
ne_IN:"Nepali(India)",
ne_NP:"Nepali(Nepal)",
ne:"Nepali",
nd_ZW:"NorthNdebele(Zimbabwe)",
nd:"NorthNdebele",
nb_NO:"NorwegianBokmål(Norway)",
nb:"NorwegianBokmål",
nn_NO:"NorwegianNynorsk(Norway)",
nn:"NorwegianNynorsk",
nyn_UG:"Nyankole(Uganda)",
nyn:"Nyankole",
or_IN:"Oriya(India)",
or:"Oriya",
om_ET:"Oromo(Ethiopia)",
om_KE:"Oromo(Kenya)",
om:"Oromo",
ps_AF:"Pashto(Afghanistan)",
ps:"Pashto",
fa_AF:"Persian(Afghanistan)",
fa_IR:"Persian(Iran)",
fa:"Persian",
pl_PL:"Polish(Poland)",
pl:"Polish",
pt_BR:"Portuguese(Brazil)",
pt_GW:"Portuguese(Guinea-Bissau)",
pt_MZ:"Portuguese(Mozambique)",
pt_PT:"Portuguese(Portugal)",
pt:"Portuguese",
pa_Arab:"Punjabi(Arabic)",
pa_Arab_PK:"Punjabi(Arabic,Pakistan)",
pa_Guru:"Punjabi(Gurmukhi)",
pa_Guru_IN:"Punjabi(Gurmukhi,India)",
pa:"Punjabi",
ro_MD:"Romanian(Moldova)",
ro_RO:"Romanian(Romania)",
ro:"Romanian",
rm_CH:"Romansh(Switzerland)",
rm:"Romansh",
rof_TZ:"Rombo(Tanzania)",
rof:"Rombo",
ru_MD:"Russian(Moldova)",
ru_RU:"Russian(Russia)",
ru_UA:"Russian(Ukraine)",
ru:"Russian",
rwk_TZ:"Rwa(Tanzania)",
rwk:"Rwa",
saq_KE:"Samburu(Kenya)",
saq:"Samburu",
sg_CF:"Sango(CentralAfricanRepublic)",
sg:"Sango",
seh_MZ:"Sena(Mozambique)",
seh:"Sena",
sr_Cyrl:"Serbian(Cyrillic)",
sr_Cyrl_BA:"Serbian(Cyrillic,BosniaandHerzegovina)",
sr_Cyrl_ME:"Serbian(Cyrillic,Montenegro)",
sr_Cyrl_RS:"Serbian(Cyrillic,Serbia)",
sr_Latn:"Serbian(Latin)",
sr_Latn_BA:"Serbian(Latin,BosniaandHerzegovina)",
sr_Latn_ME:"Serbian(Latin,Montenegro)",
sr_Latn_RS:"Serbian(Latin,Serbia)",
sr:"Serbian",
sn_ZW:"Shona(Zimbabwe)",
sn:"Shona",
ii_CN:"SichuanYi(China)",
ii:"SichuanYi",
si_LK:"Sinhala(SriLanka)",
si:"Sinhala",
sk_SK:"Slovak(Slovakia)",
sk:"Slovak",
sl_SI:"Slovenian(Slovenia)",
sl:"Slovenian",
xog_UG:"Soga(Uganda)",
xog:"Soga",
so_DJ:"Somali(Djibouti)",
so_ET:"Somali(Ethiopia)",
so_KE:"Somali(Kenya)",
so_SO:"Somali(Somalia)",
so:"Somali",
es_AR:"Spanish(Argentina)",
es_BO:"Spanish(Bolivia)",
es_CL:"Spanish(Chile)",
es_CO:"Spanish(Colombia)",
es_CR:"Spanish(CostaRica)",
es_DO:"Spanish(DominicanRepublic)",
es_EC:"Spanish(Ecuador)",
es_SV:"Spanish(ElSalvador)",
es_GQ:"Spanish(EquatorialGuinea)",
es_GT:"Spanish(Guatemala)",
es_HN:"Spanish(Honduras)",
es_419:"Spanish(LatinAmerica)",
es_MX:"Spanish(Mexico)",
es_NI:"Spanish(Nicaragua)",
es_PA:"Spanish(Panama)",
es_PY:"Spanish(Paraguay)",
es_PE:"Spanish(Peru)",
es_PR:"Spanish(PuertoRico)",
es_ES:"Spanish(Spain)",
es_US:"Spanish(UnitedStates)",
es_UY:"Spanish(Uruguay)",
es_VE:"Spanish(Venezuela)",
es:"Spanish",
sw_KE:"Swahili(Kenya)",
sw_TZ:"Swahili(Tanzania)",
sw:"Swahili",
sv_FI:"Swedish(Finland)",
sv_SE:"Swedish(Sweden)",
sv:"Swedish",
gsw_CH:"SwissGerman(Switzerland)",
gsw:"SwissGerman",
shi_Latn:"Tachelhit(Latin)",
shi_Latn_MA:"Tachelhit(Latin,Morocco)",
shi_Tfng:"Tachelhit(Tifinagh)",
shi_Tfng_MA:"Tachelhit(Tifinagh,Morocco)",
shi:"Tachelhit",
dav_KE:"Taita(Kenya)",
dav:"Taita",
ta_IN:"Tamil(India)",
ta_LK:"Tamil(SriLanka)",
ta:"Tamil",
te_IN:"Telugu(India)",
te:"Telugu",
teo_KE:"Teso(Kenya)",
teo_UG:"Teso(Uganda)",
teo:"Teso",
th_TH:"Thai(Thailand)",
th:"Thai",
bo_CN:"Tibetan(China)",
bo_IN:"Tibetan(India)",
bo:"Tibetan",
ti_ER:"Tigrinya(Eritrea)",
ti_ET:"Tigrinya(Ethiopia)",
ti:"Tigrinya",
to_TO:"Tonga(Tonga)",
to:"Tonga",
tr_TR:"Turkish(Turkey)",
tr:"Turkish",
uk_UA:"Ukrainian(Ukraine)",
uk:"Ukrainian",
ur_IN:"Urdu(India)",
ur_PK:"Urdu(Pakistan)",
ur:"Urdu",
uz_Arab:"Uzbek(Arabic)",
uz_Arab_AF:"Uzbek(Arabic,Afghanistan)",
uz_Cyrl:"Uzbek(Cyrillic)",
uz_Cyrl_UZ:"Uzbek(Cyrillic,Uzbekistan)",
uz_Latn:"Uzbek(Latin)",
uz_Latn_UZ:"Uzbek(Latin,Uzbekistan)",
uz:"Uzbek",
vi_VN:"Vietnamese(Vietnam)",
vi:"Vietnamese",
vun_TZ:"Vunjo(Tanzania)",
vun:"Vunjo",
cy_GB:"Welsh(UnitedKingdom)",
cy:"Welsh",
yo_NG:"Yoruba(Nigeria)",
yo:"Yoruba",
zu_ZA:"Zulu(SouthAfrica)",
zu:"Zulu"
}
Share
Follow
editedMar24'20at10:20
answeredFeb6'15at2:59
MichelMüllerMichelMüller
5,01333goldbadges2626silverbadges4848bronzebadges
6
4
POSIXisalocale,exactlyequivalentto"C"onPOSIXsystemsandLinux.
– cat
Dec5'16at17:23
Ijustfounditdoesn'tmakeanysenseifyouexposethislisttousers.
– MichelMüller
Dec6'16at1:46
HongKongactuallyhasvariationsforbothzh-hans-hkandzh-hant-hk.ThePHPintlsetofobjectswilltoleratespecifyinglocalesaslower-caseanddashes,aswellasacceptingthelang_COUNTRYstyles.
– Patanjali
Jan27'17at16:27
3
IfseriousaboutinternationalisationinPHP,onlyusetheintlclassesforallyourefforts,includingtimezonesandlocales,astheyarebuiltontheCLDRdatabase,andupdatedwitheachPHPversion.TheotherPHPfunctionsmaybebuiltonisolateddatasetsthatdon'thavethesynchronisationeffortthathasgoneintothecomprehensiveCLDRdataset,sosomeofthoseotherfunctionsmightgivesomediscrepanciesfromtheCLDRones,especiallyasinternationaleffortsstandardisemoreonCLDR.Youmayhavetousesomeofthoseotherfunctionsasafall-backifcateringforpre5.6.
– Patanjali
Jan27'17at16:42
AnincentivetousePHPv7,withallthelatestintlclasses,isthatitwillserveyourpagesinhalfthetime.
– Patanjali
Jan27'17at16:44
|
Show1morecomment
47
Whileacceptedanswerisprettycomplete(Iusedmyselfinsimilarquestionthatarisedtome),Ithinkitisworthtoputthewholesupportedlanguagecodesandvariations,aswellasencodings,andpointusertoafilewhichispresentinalmostanylinuxdistributions,incasehesimplywantsaquickeranswerandnointernetforexample.
Thisisthefile/usr/share/i18n/SUPPORTEDanditscontents:
aa_DJ.UTF-8UTF-8
aa_DJISO-8859-1
aa_ERUTF-8
aa_ER@saahoUTF-8
aa_ETUTF-8
af_ZA.UTF-8UTF-8
af_ZAISO-8859-1
am_ETUTF-8
an_ES.UTF-8UTF-8
an_ESISO-8859-15
ar_AE.UTF-8UTF-8
ar_AEISO-8859-6
ar_BH.UTF-8UTF-8
ar_BHISO-8859-6
ar_DZ.UTF-8UTF-8
ar_DZISO-8859-6
ar_EG.UTF-8UTF-8
ar_EGISO-8859-6
ar_INUTF-8
ar_IQ.UTF-8UTF-8
ar_IQISO-8859-6
ar_JO.UTF-8UTF-8
ar_JOISO-8859-6
ar_KW.UTF-8UTF-8
ar_KWISO-8859-6
ar_LB.UTF-8UTF-8
ar_LBISO-8859-6
ar_LY.UTF-8UTF-8
ar_LYISO-8859-6
ar_MA.UTF-8UTF-8
ar_MAISO-8859-6
ar_OM.UTF-8UTF-8
ar_OMISO-8859-6
ar_QA.UTF-8UTF-8
ar_QAISO-8859-6
ar_SA.UTF-8UTF-8
ar_SAISO-8859-6
ar_SD.UTF-8UTF-8
ar_SDISO-8859-6
ar_SY.UTF-8UTF-8
ar_SYISO-8859-6
ar_TN.UTF-8UTF-8
ar_TNISO-8859-6
ar_YE.UTF-8UTF-8
ar_YEISO-8859-6
az_AZUTF-8
as_INUTF-8
ast_ES.UTF-8UTF-8
ast_ESISO-8859-15
be_BY.UTF-8UTF-8
be_BYCP1251
be_BY@latinUTF-8
bem_ZMUTF-8
ber_DZUTF-8
ber_MAUTF-8
bg_BG.UTF-8UTF-8
bg_BGCP1251
bho_INUTF-8
bn_BDUTF-8
bn_INUTF-8
bo_CNUTF-8
bo_INUTF-8
br_FR.UTF-8UTF-8
br_FRISO-8859-1
br_FR@euroISO-8859-15
brx_INUTF-8
bs_BA.UTF-8UTF-8
bs_BAISO-8859-2
byn_ERUTF-8
ca_AD.UTF-8UTF-8
ca_ADISO-8859-15
ca_ES.UTF-8UTF-8
ca_ESISO-8859-1
ca_ES@euroISO-8859-15
ca_FR.UTF-8UTF-8
ca_FRISO-8859-15
ca_IT.UTF-8UTF-8
ca_ITISO-8859-15
crh_UAUTF-8
cs_CZ.UTF-8UTF-8
cs_CZISO-8859-2
csb_PLUTF-8
cv_RUUTF-8
cy_GB.UTF-8UTF-8
cy_GBISO-8859-14
da_DK.UTF-8UTF-8
da_DKISO-8859-1
de_AT.UTF-8UTF-8
de_ATISO-8859-1
de_AT@euroISO-8859-15
de_BE.UTF-8UTF-8
de_BEISO-8859-1
de_BE@euroISO-8859-15
de_CH.UTF-8UTF-8
de_CHISO-8859-1
de_DE.UTF-8UTF-8
de_DEISO-8859-1
de_DE@euroISO-8859-15
de_LU.UTF-8UTF-8
de_LUISO-8859-1
de_LU@euroISO-8859-15
dv_MVUTF-8
dz_BTUTF-8
el_GR.UTF-8UTF-8
el_GRISO-8859-7
el_CY.UTF-8UTF-8
el_CYISO-8859-7
en_AGUTF-8
en_AU.UTF-8UTF-8
en_AUISO-8859-1
en_BW.UTF-8UTF-8
en_BWISO-8859-1
en_CA.UTF-8UTF-8
en_CAISO-8859-1
en_DK.UTF-8UTF-8
en_DKISO-8859-1
en_GB.UTF-8UTF-8
en_GBISO-8859-1
en_HK.UTF-8UTF-8
en_HKISO-8859-1
en_IE.UTF-8UTF-8
en_IEISO-8859-1
en_IE@euroISO-8859-15
en_INUTF-8
en_NGUTF-8
en_NZ.UTF-8UTF-8
en_NZISO-8859-1
en_PH.UTF-8UTF-8
en_PHISO-8859-1
en_SG.UTF-8UTF-8
en_SGISO-8859-1
en_US.UTF-8UTF-8
en_USISO-8859-1
en_ZA.UTF-8UTF-8
en_ZAISO-8859-1
en_ZMUTF-8
en_ZW.UTF-8UTF-8
en_ZWISO-8859-1
es_AR.UTF-8UTF-8
es_ARISO-8859-1
es_BO.UTF-8UTF-8
es_BOISO-8859-1
es_CL.UTF-8UTF-8
es_CLISO-8859-1
es_CO.UTF-8UTF-8
es_COISO-8859-1
es_CR.UTF-8UTF-8
es_CRISO-8859-1
es_CUUTF-8
es_DO.UTF-8UTF-8
es_DOISO-8859-1
es_EC.UTF-8UTF-8
es_ECISO-8859-1
es_ES.UTF-8UTF-8
es_ESISO-8859-1
es_ES@euroISO-8859-15
es_GT.UTF-8UTF-8
es_GTISO-8859-1
es_HN.UTF-8UTF-8
es_HNISO-8859-1
es_MX.UTF-8UTF-8
es_MXISO-8859-1
es_NI.UTF-8UTF-8
es_NIISO-8859-1
es_PA.UTF-8UTF-8
es_PAISO-8859-1
es_PE.UTF-8UTF-8
es_PEISO-8859-1
es_PR.UTF-8UTF-8
es_PRISO-8859-1
es_PY.UTF-8UTF-8
es_PYISO-8859-1
es_SV.UTF-8UTF-8
es_SVISO-8859-1
es_US.UTF-8UTF-8
es_USISO-8859-1
es_UY.UTF-8UTF-8
es_UYISO-8859-1
es_VE.UTF-8UTF-8
es_VEISO-8859-1
et_EE.UTF-8UTF-8
et_EEISO-8859-1
et_EE.ISO-8859-15ISO-8859-15
eu_ES.UTF-8UTF-8
eu_ESISO-8859-1
eu_ES@euroISO-8859-15
fa_IRUTF-8
ff_SNUTF-8
fi_FI.UTF-8UTF-8
fi_FIISO-8859-1
fi_FI@euroISO-8859-15
fil_PHUTF-8
fo_FO.UTF-8UTF-8
fo_FOISO-8859-1
fr_BE.UTF-8UTF-8
fr_BEISO-8859-1
fr_BE@euroISO-8859-15
fr_CA.UTF-8UTF-8
fr_CAISO-8859-1
fr_CH.UTF-8UTF-8
fr_CHISO-8859-1
fr_FR.UTF-8UTF-8
fr_FRISO-8859-1
fr_FR@euroISO-8859-15
fr_LU.UTF-8UTF-8
fr_LUISO-8859-1
fr_LU@euroISO-8859-15
fur_ITUTF-8
fy_NLUTF-8
fy_DEUTF-8
ga_IE.UTF-8UTF-8
ga_IEISO-8859-1
ga_IE@euroISO-8859-15
gd_GB.UTF-8UTF-8
gd_GBISO-8859-15
gez_ERUTF-8
gez_ER@abegedeUTF-8
gez_ETUTF-8
gez_ET@abegedeUTF-8
gl_ES.UTF-8UTF-8
gl_ESISO-8859-1
gl_ES@euroISO-8859-15
gu_INUTF-8
gv_GB.UTF-8UTF-8
gv_GBISO-8859-1
ha_NGUTF-8
he_IL.UTF-8UTF-8
he_ILISO-8859-8
hi_INUTF-8
hne_INUTF-8
hr_HR.UTF-8UTF-8
hr_HRISO-8859-2
hsb_DEISO-8859-2
hsb_DE.UTF-8UTF-8
ht_HTUTF-8
hu_HU.UTF-8UTF-8
hu_HUISO-8859-2
hy_AMUTF-8
hy_AM.ARMSCII-8ARMSCII-8
id_ID.UTF-8UTF-8
id_IDISO-8859-1
ig_NGUTF-8
ik_CAUTF-8
is_IS.UTF-8UTF-8
is_ISISO-8859-1
it_CH.UTF-8UTF-8
it_CHISO-8859-1
it_IT.UTF-8UTF-8
it_ITISO-8859-1
it_IT@euroISO-8859-15
iu_CAUTF-8
iw_IL.UTF-8UTF-8
iw_ILISO-8859-8
ja_JP.EUC-JPEUC-JP
ja_JP.UTF-8UTF-8
ka_GE.UTF-8UTF-8
ka_GEGEORGIAN-PS
kk_KZ.UTF-8UTF-8
kk_KZPT154
kl_GL.UTF-8UTF-8
kl_GLISO-8859-1
km_KHUTF-8
kn_INUTF-8
ko_KR.EUC-KREUC-KR
ko_KR.UTF-8UTF-8
kok_INUTF-8
ks_INUTF-8
ks_IN@devanagariUTF-8
ku_TR.UTF-8UTF-8
ku_TRISO-8859-9
kw_GB.UTF-8UTF-8
kw_GBISO-8859-1
ky_KGUTF-8
lb_LUUTF-8
lg_UG.UTF-8UTF-8
lg_UGISO-8859-10
li_BEUTF-8
li_NLUTF-8
lij_ITUTF-8
lo_LAUTF-8
lt_LT.UTF-8UTF-8
lt_LTISO-8859-13
lv_LV.UTF-8UTF-8
lv_LVISO-8859-13
mag_INUTF-8
mai_INUTF-8
mg_MG.UTF-8UTF-8
mg_MGISO-8859-15
mhr_RUUTF-8
mi_NZ.UTF-8UTF-8
mi_NZISO-8859-13
mk_MK.UTF-8UTF-8
mk_MKISO-8859-5
ml_INUTF-8
mn_MNUTF-8
mr_INUTF-8
ms_MY.UTF-8UTF-8
ms_MYISO-8859-1
mt_MT.UTF-8UTF-8
mt_MTISO-8859-3
my_MMUTF-8
nan_TW@latinUTF-8
nb_NO.UTF-8UTF-8
nb_NOISO-8859-1
nds_DEUTF-8
nds_NLUTF-8
ne_NPUTF-8
nl_AWUTF-8
nl_BE.UTF-8UTF-8
nl_BEISO-8859-1
nl_BE@euroISO-8859-15
nl_NL.UTF-8UTF-8
nl_NLISO-8859-1
nl_NL@euroISO-8859-15
nn_NO.UTF-8UTF-8
nn_NOISO-8859-1
nr_ZAUTF-8
nso_ZAUTF-8
oc_FR.UTF-8UTF-8
oc_FRISO-8859-1
om_ETUTF-8
om_KE.UTF-8UTF-8
om_KEISO-8859-1
or_INUTF-8
os_RUUTF-8
pa_INUTF-8
pa_PKUTF-8
pap_ANUTF-8
pl_PL.UTF-8UTF-8
pl_PLISO-8859-2
ps_AFUTF-8
pt_BR.UTF-8UTF-8
pt_BRISO-8859-1
pt_PT.UTF-8UTF-8
pt_PTISO-8859-1
pt_PT@euroISO-8859-15
ro_RO.UTF-8UTF-8
ro_ROISO-8859-2
ru_RU.KOI8-RKOI8-R
ru_RU.UTF-8UTF-8
ru_RUISO-8859-5
ru_UA.UTF-8UTF-8
ru_UAKOI8-U
rw_RWUTF-8
sa_INUTF-8
sc_ITUTF-8
sd_INUTF-8
sd_IN@devanagariUTF-8
se_NOUTF-8
shs_CAUTF-8
si_LKUTF-8
sid_ETUTF-8
sk_SK.UTF-8UTF-8
sk_SKISO-8859-2
sl_SI.UTF-8UTF-8
sl_SIISO-8859-2
so_DJ.UTF-8UTF-8
so_DJISO-8859-1
so_ETUTF-8
so_KE.UTF-8UTF-8
so_KEISO-8859-1
so_SO.UTF-8UTF-8
so_SOISO-8859-1
sq_AL.UTF-8UTF-8
sq_ALISO-8859-1
sq_MKUTF-8
sr_MEUTF-8
sr_RSUTF-8
sr_RS@latinUTF-8
ss_ZAUTF-8
st_ZA.UTF-8UTF-8
st_ZAISO-8859-1
sv_FI.UTF-8UTF-8
sv_FIISO-8859-1
sv_FI@euroISO-8859-15
sv_SE.UTF-8UTF-8
sv_SEISO-8859-1
sw_KEUTF-8
sw_TZUTF-8
ta_INUTF-8
ta_LKUTF-8
te_INUTF-8
tg_TJ.UTF-8UTF-8
tg_TJKOI8-T
th_TH.UTF-8UTF-8
th_THTIS-620
ti_ERUTF-8
ti_ETUTF-8
tig_ERUTF-8
tk_TMUTF-8
tl_PH.UTF-8UTF-8
tl_PHISO-8859-1
tn_ZAUTF-8
tr_CY.UTF-8UTF-8
tr_CYISO-8859-9
tr_TR.UTF-8UTF-8
tr_TRISO-8859-9
ts_ZAUTF-8
tt_RUUTF-8
tt_RU@iqtelifUTF-8
ug_CNUTF-8
uk_UA.UTF-8UTF-8
uk_UAKOI8-U
unm_USUTF-8
ur_INUTF-8
ur_PKUTF-8
uz_UZISO-8859-1
uz_UZ@cyrillicUTF-8
ve_ZAUTF-8
vi_VNUTF-8
wa_BEISO-8859-1
wa_BE@euroISO-8859-15
wa_BE.UTF-8UTF-8
wae_CHUTF-8
wal_ETUTF-8
wo_SNUTF-8
xh_ZA.UTF-8UTF-8
xh_ZAISO-8859-1
yi_US.UTF-8UTF-8
yi_USCP1255
yo_NGUTF-8
yue_HKUTF-8
zh_CN.GB18030GB18030
zh_CN.GBKGBK
zh_CN.UTF-8UTF-8
zh_CNGB2312
zh_HK.UTF-8UTF-8
zh_HKBIG5-HKSCS
zh_SG.UTF-8UTF-8
zh_SG.GBKGBK
zh_SGGB2312
zh_TW.EUC-TWEUC-TW
zh_TW.UTF-8UTF-8
zh_TWBIG5
zu_ZA.UTF-8UTF-8
zu_ZAISO-8859-1
Share
Follow
answeredFeb25'13at4:21
StormByteStormByte
1,23011goldbadge1313silverbadges3333bronzebadges
3
2
Unlessonehasaspecificrequirementsforadifferentencoding,restrictingtoonlytheUTF-8encodingsisgoingtosimplifythePHPcodeused,becauseitisthedefaultencodingforeverythingpost5.3.
– Patanjali
Jan27'17at16:50
Iagreewithyou,ialwaysuseUTF-8foreverything,asthatsavespain,buttherearecasesinwhichyouhaveexternaldatasources,andyouneedtospecifyadifferentencoding(ifmanuallyconvertthemviaiconvismoreworkthanjustchangingtheencoding)
– StormByte
Apr28'17at17:06
ru_RUactuallyalsohaswindows-1251encodingbesideKOI8-RandISO-8859-5(yeah,that'spainbutUTF-8isthewaytogoanyway)
– YakovL
Sep10'19at18:51
Addacomment
|
43
Fromhttp://www.w3.org/International/articles/language-tags/
"Languagetagsyntaxisdefinedbythe
IETF'sBCP47.BCPstandsfor'Best
CurrentPractice',andisapersistent
nameforaseriesofRFCswhose
numberschangeastheyareupdated.
ThelatestRFCdescribinglanguagetag
syntaxisRFC5646,Tagsforthe
IdentificationofLanguages,andit
obsoletestheolderRFCs4646,3066
and1766.
Youusedtofindsubtagsbyconsulting
thelistsofcodesinvariousISO
standards,butnowyoucanfindall
subtagsintheIANALanguageSubtag
Registry."
AFAIKmostlocale-awareapplications(thatarewrittenbyprofessionals)abidebythisstandard.Itisn'tjustsomethingsomebodythrewtogetherandthatdifferentpeopleinterpretdifferently.
I'dstronglysuggestyouinvestigatetheinternationalizationfeaturesofyourparticulardevelopmentlanguage,asyou'llprobablyendupreinventingthewheelifyoudon't.
Share
Follow
answeredJul7'10at3:37
user1228user1228
1
2
Thisanswershouldbemarkedasacceptedduetorecommendedbystandardsascurrentbestpractice.
– Eido95
Jan29'19at14:03
Addacomment
|
10
Ifyouareusingphp-intltolocalizeyourapplication,youprobablywanttouseResourceBundle::getLocales()insteadofstaticlistthatyoumaintainyourself.Itcanalsogiveyoulocalesforparticularlanguage.
af
*[1]=>af_NA
*[2]=>af_ZA
*[3]=>am
*[4]=>am_ET
*[5]=>ar
*[6]=>ar_AE
*[7]=>ar_BH
*[8]=>ar_DZ
*[9]=>ar_EG
*[10]=>ar_IQ
*...
*/
?>
Share
Follow
answeredMar23'17at6:42
ddinchevddinchev
30.8k2626goldbadges8383silverbadges126126bronzebadges
2
+1because,althoughitdependsonsystemsettings,themethodonthisanswerallowsyoutoprogrammaticallygetalistoflocaleswithouthavingtocopyandmaintainyourownlist.
– GustavoStraube
May25'18at11:07
Thisdoesanswerthequestiononhowtogetlocales,butifonewantstoinsteadgetalistoflanguages,thenthiswillnowork.Thelistwillbeincomplete.Seestackoverflow.com/a/63276420/37706foralistoflanguages.
– PowerKiKi
Aug6'20at3:34
Addacomment
|
9
LanguageList
ListofalllanguageswithnamesandISO639-1codesinalllanguagesandalldataformats.
FormatsAvailable
Text
JSON
YAML
XML
HTML
CSV
SQL(MySQL,PostgreSQL,SQLite)
PHP
https://github.com/umpirsky/language-list
Share
Follow
answeredJun14'18at8:27
NormanHuthNormanHuth
39844silverbadges1111bronzebadges
4
1
Thisisonly(slightlylessthan)halfoftheproblem.Youalsoneedgeographicalspecifiersand(optionally)characterencodings.Forexample,en_IEbehavesdifferentlyfromen_USinanumberofaspects(currency,measurements,spelling,etc).
– tripleee
Feb14'20at9:39
Whynotlinktothelocalelistbythesameauthor:github.com/umpirsky/locale-list
– Nate
Jul9'20at22:06
Insteadofrelyingonhardcodeddatathataremaintainedbyveryfewcollaborators,you'dprobablybebetteroffrelyingonphp-intlextensionthatisultimatelybasedonUnicodeCLDRProject.Formoredetails,seestackoverflow.com/a/63276420/37706
– PowerKiKi
Aug6'20at3:40
butanyways,greatworkwiththatrepo!Kudos!
– sud007
Jun9at11:23
Addacomment
|
6
Here'saprettyexhaustivelistofCultureCodes.AsfarasIcantell,theydon'tvarybetweenprogramminglanguagessinceit'sanRFCstandard.AsforEnglish,Ithinkifyousupporteitherthegenericenorpossiblytheen-USthenyoushouldbejustfine.
Share
Follow
answeredJul7'10at3:36
ChaseFlorellChaseFlorell
44k5656goldbadges178178silverbadges368368bronzebadges
6
8
'genericenorpossiblytheen-USthenyoushouldbejustfine'Nonono!
– Pete
Jul7'10at4:37
@Pete,areyousayingheshoulduseallEnglishlocals?Ifhewant'stosupportjustone,whatwouldyousupport?
– ChaseFlorell
Jul7'10at4:47
andyes,dateswilldifferbetweendifferentlocales,butifyouweretochoosejustone...
– ChaseFlorell
Jul7'10at4:48
7
Ifhe'sdevelopinganinternationalsite,ideallyyes,alltheEnglishlocales.Is08.07.10the8thofJulyorthe7thofAugust?Atminimumen-USanden-GB.Whichsingularvarianttousewouldbedetrminedbythesite'svisitors,thoughjust1meansit'snotafullyinternationalsite.(Andifreallyjustone,thenen-GBwouldbemorecorrectintermsoforiginandnumberofcountries:-P)
– Pete
Jul7'10at5:05
1
@AliceWonder.Reallydependsuponthetargetaudience,becauseunlessyoutargetalocalaudience,whotendtoactivelyresisting'foreign'spellings,mostvisitorswilltoleratecontentaimedataworld-wideaudiencebeingen-US.Justafactoflife.JustlookathowmostonlinenewspapersitesaroundtheworlduseUS-stylequotes,evenwhentargetinglocalaudiences,justbecauseoftheculturalswampingbyUS-sourcedmaterialhasoverriddenwhatevermayhavebeeninacountry'sofficialstyleguide.Audienceshavemovedon,despitewhatmanyofusmayuseforourpersonalpreferences.
– Patanjali
Jan27'17at16:23
|
Show1morecomment
4
Ispendawholedayorganizingthisinformationformycompanysincewearebuildingamulti-lingualplatform.Ifyoufindanyissue,missinglanguage,orincorrectcharsetpleaseeditthelistsoitwillbemoreusefulinthefuture.Hereisthecompletelistofallthelanguagelocales,names,andcharsets.
ForPHParrayhereisthelinkhttps://github.com/jerryurenaa/language-list/blob/main/language-list-array.php
forJSONhereisthelinkhttps://github.com/jerryurenaa/language-list/blob/main/language-list-json.json
Share
Follow
answeredFeb8at2:05
jerryurenaajerryurenaa
2,2041212silverbadges1212bronzebadges
Addacomment
|
4
Notsurehowthiswasn'tsuggestedyet,buthere'sthelocaleforhtmlusingthedatafrom@MichelMüller: