Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred while trying to Add language #11427

Closed
codekenjin opened this issue Oct 20, 2021 · 7 comments
Closed

An error occurred while trying to Add language #11427

codekenjin opened this issue Oct 20, 2021 · 7 comments

Comments

@codekenjin
Copy link

Which exact Umbraco version are you using? For example: 8.13.1 - don't just write v8

9.0.1

Bug summary

An error occurred when clicked on Settings->Languages->Add language

Specifics

URL:https://localhost:44303/umbraco#/settings/languages/edit/-1?create=true
Browsers: Chrome v94.0.4606.81 & Firefox v93.0

Error message:

Received an error from the server
An error occurred

An item with the same key has already been added. Key: pa
Exception Details
System.ArgumentException, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e: An item with the same key has already been added. Key: pa
Stacktrace

at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)

at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer)

at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func`2 elementSelector)

at Umbraco.Cms.Web.BackOffice.Controllers.LanguageController.GetAllCultures()

at lambda_method911(Closure , Object , Object[] )

at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)

at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()

at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()

--- End of stack trace from previous location ---

at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)

at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()

--- End of stack trace from previous location ---

at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

Steps to reproduce

Click on Settings->Languages->Add language

Expected result / actual result

Expected result: A list of languages for choosing
Actual result: Error occurred, no language for choosing

@IbrahimMNada
Copy link
Contributor

An item with the same key has already been added. Key: pa

the language is already inserted.

is it shown in the list of languages ?

@bergmania
Copy link
Member

Hi @codekenjin ..

Can you try to execute this on your setup

CultureInfo.GetCultures(CultureTypes.AllCultures)
                .Select(x=>x.Name)
                .Distinct()
                .Where(x => !x.IsNullOrWhiteSpace())
                .Select(x => new CultureInfo(x)) // important!
                .OrderBy(x => x.EnglishName)
                .ToDictionary(x => x.Name, x => x.EnglishName);

and ensure that do not fail, as I cannot reproduce your problem on my setup.

@codekenjin
Copy link
Author

An item with the same key has already been added. Key: pa

the language is already inserted.

is it shown in the list of languages ?

There is no language list to show for me and I tried to "Add language" before I add anything. So don't know why.

@codekenjin
Copy link
Author

Hi @codekenjin ..

Can you try to execute this on your setup

CultureInfo.GetCultures(CultureTypes.AllCultures)
                .Select(x=>x.Name)
                .Distinct()
                .Where(x => !x.IsNullOrWhiteSpace())
                .Select(x => new CultureInfo(x)) // important!
                .OrderBy(x => x.EnglishName)
                .ToDictionary(x => x.Name, x => x.EnglishName);

and ensure that do not fail, as I cannot reproduce your problem on my setup.

Hi bergmania,

May I know where I should put your script to execute? Thanks.

@bergmania
Copy link
Member

@codekenjin It doesn't matter.. You could put in a template/view like this:

@using System.Globalization
<ul>
@foreach( var kvp in CultureInfo.GetCultures(CultureTypes.AllCultures)
                .Select(x=>x.Name)
                .Distinct()
                .Where(x => !x.IsNullOrWhiteSpace())
                .Select(x => new CultureInfo(x)) // important!
                .OrderBy(x => x.EnglishName)
                .ToDictionary(x => x.Name, x => x.EnglishName))
{
   <li>
       <ul>
           <li>@kvp.Key</li>
           <li>@kvp.Value</li>
       </ul>
       
   </li>             
}
</ul>

Ensure it does work and please post the outcome here :)

@codekenjin
Copy link
Author

@codekenjin It doesn't matter.. You could put in a template/view like this:

@using System.Globalization
<ul>
@foreach( var kvp in CultureInfo.GetCultures(CultureTypes.AllCultures)
                .Select(x=>x.Name)
                .Distinct()
                .Where(x => !x.IsNullOrWhiteSpace())
                .Select(x => new CultureInfo(x)) // important!
                .OrderBy(x => x.EnglishName)
                .ToDictionary(x => x.Name, x => x.EnglishName))
{
   <li>
       <ul>
           <li>@kvp.Key</li>
           <li>@kvp.Value</li>
       </ul>
       
   </li>             
}
</ul>

Ensure it does work and please post the outcome here :)

@bergmania
Here you go:

aa
Afar
aa-DJ
Afar (Djibouti)
aa-ER
Afar (Eritrea)
aa-ET
Afar (Ethiopia)
af
Afrikaans
af-NA
Afrikaans (Namibia)
af-ZA
Afrikaans (South Africa)
agq
Aghem
agq-CM
Aghem (Cameroon)
ak
Akan
ak-GH
Akan (Ghana)
sq
Albanian
sq-AL
Albanian (Albania)
sq-XK
Albanian (Kosovo)
sq-MK
Albanian (North Macedonia)
am
Amharic
am-ET
Amharic (Ethiopia)
ar
Arabic
ar-DZ
Arabic (Algeria)
ar-BH
Arabic (Bahrain)
ar-TD
Arabic (Chad)
ar-KM
Arabic (Comoros)
ar-DJ
Arabic (Djibouti)
ar-EG
Arabic (Egypt)
ar-ER
Arabic (Eritrea)
ar-IQ
Arabic (Iraq)
ar-IL
Arabic (Israel)
ar-JO
Arabic (Jordan)
ar-KW
Arabic (Kuwait)
ar-LB
Arabic (Lebanon)
ar-LY
Arabic (Libya)
ar-MR
Arabic (Mauritania)
ar-MA
Arabic (Morocco)
ar-OM
Arabic (Oman)
ar-PS
Arabic (Palestinian Authority)
ar-QA
Arabic (Qatar)
ar-SA
Arabic (Saudi Arabia)
ar-SO
Arabic (Somalia)
ar-SS
Arabic (South Sudan)
ar-SD
Arabic (Sudan)
ar-SY
Arabic (Syria)
ar-TN
Arabic (Tunisia)
ar-AE
Arabic (United Arab Emirates)
ar-001
Arabic (World)
ar-YE
Arabic (Yemen)
hy
Armenian
hy-AM
Armenian (Armenia)
as
Assamese
as-IN
Assamese (India)
ast
Asturian
ast-ES
Asturian (Spain)
asa
Asu
asa-TZ
Asu (Tanzania)
az
Azerbaijani
az-Cyrl
Azerbaijani
az-Latn
Azerbaijani
az-Cyrl-AZ
Azerbaijani (Cyrillic, Azerbaijan)
az-Latn-AZ
Azerbaijani (Latin, Azerbaijan)
ksf
Bafia
ksf-CM
Bafia (Cameroon)
bm
Bamanankan
bm-Latn-ML
Bamanankan (Latin, Mali)
bn
Bangla
bn-BD
Bangla (Bangladesh)
bn-IN
Bangla (India)
bas
Basaa
bas-CM
Basaa (Cameroon)
ba
Bashkir
ba-RU
Bashkir (Russia)
eu
Basque
eu-ES
Basque (Spain)
be
Belarusian
be-BY
Belarusian (Belarus)
bem
Bemba
bem-ZM
Bemba (Zambia)
bez
Bena
bez-TZ
Bena (Tanzania)
byn
Blin
byn-ER
Blin (Eritrea)
brx
Bodo
brx-IN
Bodo (India)
bs
Bosnian
bs-Cyrl
Bosnian
bs-Latn
Bosnian
bs-Cyrl-BA
Bosnian (Cyrillic, Bosnia & Herzegovina)
bs-Latn-BA
Bosnian (Latin, Bosnia & Herzegovina)
br
Breton
br-FR
Breton (France)
bg
Bulgarian
bg-BG
Bulgarian (Bulgaria)
my
Burmese
my-MM
Burmese (Myanmar)
ca
Catalan
ca-AD
Catalan (Andorra)
ca-FR
Catalan (France)
ca-IT
Catalan (Italy)
ca-ES
Catalan (Spain)
ceb
Cebuano
ceb-PH
Cebuano (Philippines)
tzm
Central Atlas Tamazight
tzm-Arab
Central Atlas Tamazight
tzm-Tfng
Central Atlas Tamazight
tzm-DZ
Central Atlas Tamazight (Algeria)
tzm-Arab-MA
Central Atlas Tamazight (Arabic, Morocco)
tzm-Latn-MA
Central Atlas Tamazight (Latin, Morocco)
tzm-Tfng-MA
Central Atlas Tamazight (Tifinagh, Morocco)
ccp
Chakma
ccp-BD
Chakma (Bangladesh)
ccp-IN
Chakma (India)
ce
Chechen
ce-RU
Chechen (Russia)
chr
Cherokee
chr-Cher-US
Cherokee (Cherokee, United States)
cgg
Chiga
cgg-UG
Chiga (Uganda)
zh
Chinese
zh-Hans
Chinese
zh-Hant
Chinese
zh-CN
Chinese (China)
zh-HK
Chinese (Hong Kong SAR)
zh-MO
Chinese (Macao SAR)
zh-Hans-HK
Chinese (Simplified, Hong Kong SAR)
zh-Hans-MO
Chinese (Simplified, Macao SAR)
zh-SG
Chinese (Singapore)
zh-TW
Chinese (Taiwan)
cu
Church Slavic
cu-RU
Church Slavic (Russia)
ksh
Colognian
ksh-DE
Colognian (Germany)
kw
Cornish
kw-GB
Cornish (United Kingdom)
co
Corsican
co-FR
Corsican (France)
hr
Croatian
hr-BA
Croatian (Bosnia & Herzegovina)
hr-HR
Croatian (Croatia)
cs
Czech
cs-CZ
Czech (Czechia)
da
Danish
da-DK
Danish (Denmark)
da-GL
Danish (Greenland)
dv
Divehi
dv-MV
Divehi (Maldives)
doi
Dogri
doi-IN
Dogri (India)
dua
Duala
dua-CM
Duala (Cameroon)
nl
Dutch
nl-AW
Dutch (Aruba)
nl-BE
Dutch (Belgium)
nl-BQ
Dutch (Bonaire, Sint Eustatius and Saba)
nl-CW
Dutch (Curaçao)
nl-NL
Dutch (Netherlands)
nl-SX
Dutch (Sint Maarten)
nl-SR
Dutch (Suriname)
dz
Dzongkha
dz-BT
Dzongkha (Bhutan)
bin
Edo
bin-NG
Edo (Nigeria)
ebu
Embu
ebu-KE
Embu (Kenya)
en
English
en-AS
English (American Samoa)
en-AI
English (Anguilla)
en-AG
English (Antigua & Barbuda)
en-AU
English (Australia)
en-AT
English (Austria)
en-BS
English (Bahamas)
en-BB
English (Barbados)
en-BE
English (Belgium)
en-BZ
English (Belize)
en-BM
English (Bermuda)
en-BW
English (Botswana)
en-IO
English (British Indian Ocean Territory)
en-VG
English (British Virgin Islands)
en-BI
English (Burundi)
en-CM
English (Cameroon)
en-CA
English (Canada)
en-029
English (Caribbean)
en-KY
English (Cayman Islands)
en-CX
English (Christmas Island)
en-CC
English (Cocos [Keeling] Islands)
en-CK
English (Cook Islands)
en-CY
English (Cyprus)
en-DK
English (Denmark)
en-DM
English (Dominica)
en-ER
English (Eritrea)
en-SZ
English (Eswatini)
en-150
English (Europe)
en-FK
English (Falkland Islands)
en-FJ
English (Fiji)
en-FI
English (Finland)
en-GM
English (Gambia)
en-DE
English (Germany)
en-GH
English (Ghana)
en-GI
English (Gibraltar)
en-GD
English (Grenada)
en-GU
English (Guam)
en-GG
English (Guernsey)
en-GY
English (Guyana)
en-HK
English (Hong Kong SAR)
en-IN
English (India)
en-ID
English (Indonesia)
en-IE
English (Ireland)
en-IM
English (Isle of Man)
en-IL
English (Israel)
en-JM
English (Jamaica)
en-JE
English (Jersey)
en-KE
English (Kenya)
en-KI
English (Kiribati)
en-LS
English (Lesotho)
en-LR
English (Liberia)
en-MO
English (Macao SAR)
en-MG
English (Madagascar)
en-MW
English (Malawi)
en-MY
English (Malaysia)
en-MT
English (Malta)
en-MH
English (Marshall Islands)
en-MU
English (Mauritius)
en-FM
English (Micronesia)
en-MS
English (Montserrat)
en-NA
English (Namibia)
en-NR
English (Nauru)
en-NL
English (Netherlands)
en-NZ
English (New Zealand)
en-NG
English (Nigeria)
en-NU
English (Niue)
en-NF
English (Norfolk Island)
en-MP
English (Northern Mariana Islands)
en-PK
English (Pakistan)
en-PW
English (Palau)
en-PG
English (Papua New Guinea)
en-PH
English (Philippines)
en-PN
English (Pitcairn Islands)
en-PR
English (Puerto Rico)
en-RW
English (Rwanda)
en-WS
English (Samoa)
en-SC
English (Seychelles)
en-SL
English (Sierra Leone)
en-SG
English (Singapore)
en-SX
English (Sint Maarten)
en-SI
English (Slovenia)
en-SB
English (Solomon Islands)
en-ZA
English (South Africa)
en-SS
English (South Sudan)
en-SH
English (St Helena, Ascension, Tristan da Cunha)
en-KN
English (St. Kitts & Nevis)
en-LC
English (St. Lucia)
en-VC
English (St. Vincent & Grenadines)
en-SD
English (Sudan)
en-SE
English (Sweden)
en-CH
English (Switzerland)
en-TZ
English (Tanzania)
en-TK
English (Tokelau)
en-TO
English (Tonga)
en-TT
English (Trinidad & Tobago)
en-TC
English (Turks & Caicos Islands)
en-TV
English (Tuvalu)
en-UM
English (U.S. Outlying Islands)
en-VI
English (U.S. Virgin Islands)
en-UG
English (Uganda)
en-AE
English (United Arab Emirates)
en-GB
English (United Kingdom)
en-US-posix
English (United States, Computer)
en-US
English (United States)
en-VU
English (Vanuatu)
en-001
English (World)
en-ZM
English (Zambia)
en-ZW
English (Zimbabwe)
eo
Esperanto
eo-001
Esperanto (World)
et
Estonian
et-EE
Estonian (Estonia)
ee
Ewe
ee-GH
Ewe (Ghana)
ee-TG
Ewe (Togo)
ewo
Ewondo
ewo-CM
Ewondo (Cameroon)
fo
Faroese
fo-DK
Faroese (Denmark)
fo-FO
Faroese (Faroe Islands)
fil
Filipino
fil-PH
Filipino (Philippines)
fi
Finnish
fi-FI
Finnish (Finland)
fr
French
fr-DZ
French (Algeria)
fr-BE
French (Belgium)
fr-BJ
French (Benin)
fr-BF
French (Burkina Faso)
fr-BI
French (Burundi)
fr-CM
French (Cameroon)
fr-CA
French (Canada)
fr-029
French (Caribbean)
fr-CF
French (Central African Republic)
fr-TD
French (Chad)
fr-KM
French (Comoros)
fr-CD
French (Congo [DRC])
fr-CG
French (Congo)
fr-CI
French (Côte d’Ivoire)
fr-DJ
French (Djibouti)
fr-GQ
French (Equatorial Guinea)
fr-FR
French (France)
fr-GF
French (French Guiana)
fr-PF
French (French Polynesia)
fr-GA
French (Gabon)
fr-GP
French (Guadeloupe)
fr-GN
French (Guinea)
fr-HT
French (Haiti)
fr-LU
French (Luxembourg)
fr-MG
French (Madagascar)
fr-ML
French (Mali)
fr-MQ
French (Martinique)
fr-MR
French (Mauritania)
fr-MU
French (Mauritius)
fr-YT
French (Mayotte)
fr-MC
French (Monaco)
fr-MA
French (Morocco)
fr-NC
French (New Caledonia)
fr-NE
French (Niger)
fr-RE
French (Réunion)
fr-RW
French (Rwanda)
fr-SN
French (Senegal)
fr-SC
French (Seychelles)
fr-BL
French (St. Barthélemy)
fr-MF
French (St. Martin)
fr-PM
French (St. Pierre & Miquelon)
fr-CH
French (Switzerland)
fr-SY
French (Syria)
fr-TG
French (Togo)
fr-TN
French (Tunisia)
fr-VU
French (Vanuatu)
fr-WF
French (Wallis & Futuna)
fur
Friulian
fur-IT
Friulian (Italy)
ff
Fulah
ff-Adlm
Fulah
ff-Latn
Fulah
ff-Adlm-BF
Fulah (Adlam, Burkina Faso)
ff-Adlm-CM
Fulah (Adlam, Cameroon)
ff-Adlm-GM
Fulah (Adlam, Gambia)
ff-Adlm-GH
Fulah (Adlam, Ghana)
ff-Adlm-GW
Fulah (Adlam, Guinea-Bissau)
ff-Adlm-GN
Fulah (Adlam, Guinea)
ff-Adlm-LR
Fulah (Adlam, Liberia)
ff-Adlm-MR
Fulah (Adlam, Mauritania)
ff-Adlm-NE
Fulah (Adlam, Niger)
ff-Adlm-NG
Fulah (Adlam, Nigeria)
ff-Adlm-SN
Fulah (Adlam, Senegal)
ff-Adlm-SL
Fulah (Adlam, Sierra Leone)
ff-Latn-BF
Fulah (Latin, Burkina Faso)
ff-Latn-CM
Fulah (Latin, Cameroon)
ff-Latn-GM
Fulah (Latin, Gambia)
ff-Latn-GH
Fulah (Latin, Ghana)
ff-Latn-GW
Fulah (Latin, Guinea-Bissau)
ff-Latn-GN
Fulah (Latin, Guinea)
ff-Latn-LR
Fulah (Latin, Liberia)
ff-Latn-MR
Fulah (Latin, Mauritania)
ff-Latn-NE
Fulah (Latin, Niger)
ff-Latn-NG
Fulah (Latin, Nigeria)
ff-Latn-SN
Fulah (Latin, Senegal)
ff-Latn-SL
Fulah (Latin, Sierra Leone)
gl
Galician
gl-ES
Galician (Spain)
lg
Ganda
lg-UG
Ganda (Uganda)
ka
Georgian
ka-GE
Georgian (Georgia)
de
German
de-AT
German (Austria)
de-BE
German (Belgium)
de-DE
German (Germany)
de-IT
German (Italy)
de-LI
German (Liechtenstein)
de-LU
German (Luxembourg)
de-CH
German (Switzerland)
el
Greek
el-CY
Greek (Cyprus)
el-GR
Greek (Greece)
gn
Guarani
gn-PY
Guarani (Paraguay)
gu
Gujarati
gu-IN
Gujarati (India)
guz
Gusii
guz-KE
Gusii (Kenya)
ha
Hausa
ha-Latn-GH
Hausa (Latin, Ghana)
ha-Latn-NE
Hausa (Latin, Niger)
ha-Latn-NG
Hausa (Latin, Nigeria)
haw
Hawaiian
haw-US
Hawaiian (United States)
he
Hebrew
he-IL
Hebrew (Israel)
hi
Hindi
hi-IN
Hindi (India)
hu
Hungarian
hu-HU
Hungarian (Hungary)
ibb
Ibibio
ibb-NG
Ibibio (Nigeria)
is
Icelandic
is-IS
Icelandic (Iceland)
ig
Igbo
ig-NG
Igbo (Nigeria)
smn
Inari Sami
smn-FI
Inari Sami (Finland)
id
Indonesian
id-ID
Indonesian (Indonesia)
ia
Interlingua
ia-001
Interlingua (World)
iu
Inuktitut
iu-Latn
Inuktitut
iu-CA
Inuktitut (Canada)
iu-Latn-CA
Inuktitut (Latin, Canada)
ga
Irish
ga-IE
Irish (Ireland)
ga-GB
Irish (United Kingdom)
xh
isiXhosa
xh-ZA
isiXhosa (South Africa)
zu
isiZulu
zu-ZA
isiZulu (South Africa)
it
Italian
it-IT
Italian (Italy)
it-SM
Italian (San Marino)
it-CH
Italian (Switzerland)
it-VA
Italian (Vatican City)
ja
Japanese
ja-JP
Japanese (Japan)
jv
Javanese
jv-Java
Javanese
jv-ID
Javanese (Indonesia)
jv-Java-ID
Javanese (Javanese, Indonesia)
dyo
Jola-Fonyi
dyo-SN
Jola-Fonyi (Senegal)
kea
Kabuverdianu
kea-CV
Kabuverdianu (Cabo Verde)
kab
Kabyle
kab-DZ
Kabyle (Algeria)
kkj
Kako
kkj-CM
Kako (Cameroon)
kl
Kalaallisut
kl-GL
Kalaallisut (Greenland)
kln
Kalenjin
kln-KE
Kalenjin (Kenya)
kam
Kamba
kam-KE
Kamba (Kenya)
kn
Kannada
kn-IN
Kannada (India)
kr
Kanuri
kr-Latn
Kanuri
kr-Latn-NG
Kanuri (Latin, Nigeria)
ks
Kashmiri
ks-Arab
Kashmiri
ks-Deva
Kashmiri
ks-Arab-IN
Kashmiri (Arabic, India)
ks-Deva-IN
Kashmiri (Devanagari, India)
kk
Kazakh
kk-KZ
Kazakh (Kazakhstan)
km
Khmer
km-KH
Khmer (Cambodia)
ki
Kikuyu
ki-KE
Kikuyu (Kenya)
rw
Kinyarwanda
rw-RW
Kinyarwanda (Rwanda)
sw
Kiswahili
sw-CD
Kiswahili (Congo [DRC])
sw-KE
Kiswahili (Kenya)
sw-TZ
Kiswahili (Tanzania)
sw-UG
Kiswahili (Uganda)
kok
Konkani
kok-IN
Konkani (India)
ko
Korean
ko-KR
Korean (Korea)
ko-KP
Korean (North Korea)
khq
Koyra Chiini
khq-ML
Koyra Chiini (Mali)
ses
Koyraboro Senni
ses-ML
Koyraboro Senni (Mali)
ku
Kurdish
ku-Arab-IR
Kurdish (Arabic, Iran)
ku-Arab-IQ
Kurdish (Arabic, Iraq)
nmg
Kwasio
nmg-CM
Kwasio (Cameroon)
ky
Kyrgyz
ky-KG
Kyrgyz (Kyrgyzstan)
quc
Kʼicheʼ
quc-GT
Kʼicheʼ (Guatemala)
lkt
Lakota
lkt-US
Lakota (United States)
lag
Langi
lag-TZ
Langi (Tanzania)
lo
Lao
lo-LA
Lao (Laos)
la
Latin
la-VA
Latin (Vatican City)
lv
Latvian
lv-LV
Latvian (Latvia)
ln
Lingala
ln-AO
Lingala (Angola)
ln-CF
Lingala (Central African Republic)
ln-CD
Lingala (Congo [DRC])
ln-CG
Lingala (Congo)
lt
Lithuanian
lt-LT
Lithuanian (Lithuania)
nds
Low German
nds-DE
Low German (Germany)
nds-NL
Low German (Netherlands)
dsb
Lower Sorbian
dsb-DE
Lower Sorbian (Germany)
lu
Luba-Katanga
lu-CD
Luba-Katanga (Congo [DRC])
smj
Lule Sami
smj-NO
Lule Sami (Norway)
smj-SE
Lule Sami (Sweden)
luo
Luo
luo-KE
Luo (Kenya)
lb
Luxembourgish
lb-LU
Luxembourgish (Luxembourg)
luy
Luyia
luy-KE
Luyia (Kenya)
mk
Macedonian
mk-MK
Macedonian (North Macedonia)
jmc
Machame
jmc-TZ
Machame (Tanzania)
mai
Maithili
mai-IN
Maithili (India)
mgh
Makhuwa-Meetto
mgh-MZ
Makhuwa-Meetto (Mozambique)
kde
Makonde
kde-TZ
Makonde (Tanzania)
mg
Malagasy
mg-MG
Malagasy (Madagascar)
ms
Malay
ms-BN
Malay (Brunei)
ms-ID
Malay (Indonesia)
ms-MY
Malay (Malaysia)
ms-SG
Malay (Singapore)
ml
Malayalam
ml-IN
Malayalam (India)
mt
Maltese
mt-MT
Maltese (Malta)
mni
Manipuri
mni-Beng
Manipuri
mni-Beng-IN
Manipuri (Bangla, India)
gv
Manx
gv-IM
Manx (Isle of Man)
mi
Maori
mi-NZ
Maori (New Zealand)
arn
Mapuche
arn-CL
Mapuche (Chile)
mr
Marathi
mr-IN
Marathi (India)
mas
Masai
mas-KE
Masai (Kenya)
mas-TZ
Masai (Tanzania)
mzn
Mazanderani
mzn-IR
Mazanderani (Iran)
mer
Meru
mer-KE
Meru (Kenya)
mgo
Metaʼ
mgo-CM
Metaʼ (Cameroon)
moh
Mohawk
moh-CA
Mohawk (Canada)
mn
Mongolian
mn-Mong
Mongolian
mn-MN
Mongolian (Mongolia)
mn-Mong-CN
Mongolian (Mongolian, China)
mn-Mong-MN
Mongolian (Mongolian, Mongolia)
mfe
Morisyen
mfe-MU
Morisyen (Mauritius)
mua
Mundang
mua-CM
Mundang (Cameroon)
nqo
N’Ko
nqo-GN
N’Ko (Guinea)
naq
Nama
naq-NA
Nama (Namibia)
ne
Nepali
ne-IN
Nepali (India)
ne-NP
Nepali (Nepal)
nnh
Ngiemboon
nnh-CM
Ngiemboon (Cameroon)
jgo
Ngomba
jgo-CM
Ngomba (Cameroon)
pcm
Nigerian Pidgin
pcm-NG
Nigerian Pidgin (Nigeria)
nd
North Ndebele
nd-ZW
North Ndebele (Zimbabwe)
lrc
Northern Luri
lrc-IR
Northern Luri (Iran)
lrc-IQ
Northern Luri (Iraq)
se
Northern Sami
se-FI
Northern Sami (Finland)
se-NO
Northern Sami (Norway)
se-SE
Northern Sami (Sweden)
nb
Norwegian Bokmål
nb-NO
Norwegian Bokmål (Norway)
nb-SJ
Norwegian Bokmål (Svalbard & Jan Mayen)
nn
Norwegian Nynorsk
nn-NO
Norwegian Nynorsk (Norway)
nus
Nuer
nus-SS
Nuer (South Sudan)
nyn
Nyankole
nyn-UG
Nyankole (Uganda)
oc
Occitan
oc-FR
Occitan (France)
or
Odia
or-IN
Odia (India)
om
Oromo
om-ET
Oromo (Ethiopia)
om-KE
Oromo (Kenya)
os
Ossetic
os-GE
Ossetic (Georgia)
os-RU
Ossetic (Russia)
pap
Papiamento
pap-029
Papiamento (Caribbean)
ps
Pashto
ps-AF
Pashto (Afghanistan)
ps-PK
Pashto (Pakistan)
fa
Persian
fa-IR
Persian (Iran)
pl
Polish
pl-PL
Polish (Poland)
pt
Portuguese
pt-AO
Portuguese (Angola)
pt-BR
Portuguese (Brazil)
pt-CV
Portuguese (Cabo Verde)
pt-GQ
Portuguese (Equatorial Guinea)
pt-GW
Portuguese (Guinea-Bissau)
pt-LU
Portuguese (Luxembourg)
pt-MO
Portuguese (Macao SAR)
pt-MZ
Portuguese (Mozambique)
pt-PT
Portuguese (Portugal)
pt-ST
Portuguese (São Tomé & Príncipe)
pt-CH
Portuguese (Switzerland)
pt-TL
Portuguese (Timor-Leste)
prs-AF
prs (Afghanistan)
prg
Prussian
prg-001
Prussian (World)
pa
Punjabi
pa-Arab
Punjabi
pa-Arab-PK
Punjabi (Arabic, Pakistan)
pa-IN
Punjabi (India)
quz
quz
quz-BO
quz (Bolivia)
quz-EC
quz (Ecuador)
quz-PE
quz (Peru)
ro
Romanian
ro-MD
Romanian (Moldova)
ro-RO
Romanian (Romania)
rm
Romansh
rm-CH
Romansh (Switzerland)
rof
Rombo
rof-TZ
Rombo (Tanzania)
rn
Rundi
rn-BI
Rundi (Burundi)
ru
Russian
ru-BY
Russian (Belarus)
ru-KZ
Russian (Kazakhstan)
ru-KG
Russian (Kyrgyzstan)
ru-MD
Russian (Moldova)
ru-RU
Russian (Russia)
ru-UA
Russian (Ukraine)
rwk
Rwa
rwk-TZ
Rwa (Tanzania)
ssy
Saho
ssy-ER
Saho (Eritrea)
sah
Sakha
sah-RU
Sakha (Russia)
saq
Samburu
saq-KE
Samburu (Kenya)
sg
Sango
sg-CF
Sango (Central African Republic)
sbp
Sangu
sbp-TZ
Sangu (Tanzania)
sa
Sanskrit
sa-IN
Sanskrit (India)
sat
Santali
sat-Olck
Santali
sat-Olck-IN
Santali (Ol Chiki, India)
gd
Scottish Gaelic
gd-GB
Scottish Gaelic (United Kingdom)
seh
Sena
seh-MZ
Sena (Mozambique)
sr
Serbian
sr-Cyrl
Serbian
sr-Latn
Serbian
sr-Cyrl-BA
Serbian (Cyrillic, Bosnia & Herzegovina)
sr-Cyrl-XK
Serbian (Cyrillic, Kosovo)
sr-Cyrl-ME
Serbian (Cyrillic, Montenegro)
sr-Cyrl-RS
Serbian (Cyrillic, Serbia)
sr-Latn-BA
Serbian (Latin, Bosnia & Herzegovina)
sr-Latn-XK
Serbian (Latin, Kosovo)
sr-Latn-ME
Serbian (Latin, Montenegro)
sr-Latn-RS
Serbian (Latin, Serbia)
st
Sesotho
st-LS
Sesotho (Lesotho)
st-ZA
Sesotho (South Africa)
nso
Sesotho sa Leboa
nso-ZA
Sesotho sa Leboa (South Africa)
tn
Setswana
tn-BW
Setswana (Botswana)
tn-ZA
Setswana (South Africa)
ksb
Shambala
ksb-TZ
Shambala (Tanzania)
sn
Shona
sn-Latn-ZW
Shona (Latin, Zimbabwe)
sd
Sindhi
sd-Arab
Sindhi
sd-Deva
Sindhi
sd-Arab-PK
Sindhi (Arabic, Pakistan)
sd-Deva-IN
Sindhi (Devanagari, India)
si
Sinhala
si-LK
Sinhala (Sri Lanka)
ss
siSwati
ss-SZ
siSwati (Eswatini)
ss-ZA
siSwati (South Africa)
sms
Skolt Sami
sms-FI
Skolt Sami (Finland)
sk
Slovak
sk-SK
Slovak (Slovakia)
sl
Slovenian
sl-SI
Slovenian (Slovenia)
xog
Soga
xog-UG
Soga (Uganda)
so
Somali
so-DJ
Somali (Djibouti)
so-ET
Somali (Ethiopia)
so-KE
Somali (Kenya)
so-SO
Somali (Somalia)
nr
South Ndebele
nr-ZA
South Ndebele (South Africa)
sma
Southern Sami
sma-NO
Southern Sami (Norway)
sma-SE
Southern Sami (Sweden)
es
Spanish
es-AR
Spanish (Argentina)
es-BZ
Spanish (Belize)
es-BO
Spanish (Bolivia)
es-BR
Spanish (Brazil)
es-CL
Spanish (Chile)
es-CO
Spanish (Colombia)
es-CR
Spanish (Costa Rica)
es-CU
Spanish (Cuba)
es-DO
Spanish (Dominican Republic)
es-EC
Spanish (Ecuador)
es-SV
Spanish (El Salvador)
es-GQ
Spanish (Equatorial Guinea)
es-GT
Spanish (Guatemala)
es-HN
Spanish (Honduras)
es-419
Spanish (Latin America)
es-MX
Spanish (Mexico)
es-NI
Spanish (Nicaragua)
es-PA
Spanish (Panama)
es-PY
Spanish (Paraguay)
es-PE
Spanish (Peru)
es-PH
Spanish (Philippines)
es-PR
Spanish (Puerto Rico)
es-ES
Spanish (Spain)
es-US
Spanish (United States)
es-UY
Spanish (Uruguay)
es-VE
Spanish (Venezuela)
zgh
Standard Moroccan Tamazight
zgh-Tfng-MA
Standard Moroccan Tamazight (Tifinagh, Morocco)
su
Sundanese
su-Latn
Sundanese
su-Latn-ID
Sundanese (Latin, Indonesia)
sv
Swedish
sv-AX
Swedish (Åland Islands)
sv-FI
Swedish (Finland)
sv-SE
Swedish (Sweden)
gsw
Swiss German
gsw-FR
Swiss German (France)
gsw-LI
Swiss German (Liechtenstein)
gsw-CH
Swiss German (Switzerland)
syr
Syriac
syr-SY
Syriac (Syria)
shi
Tachelhit
shi-Latn
Tachelhit
shi-Tfng
Tachelhit
shi-Latn-MA
Tachelhit (Latin, Morocco)
shi-Tfng-MA
Tachelhit (Tifinagh, Morocco)
dav
Taita
dav-KE
Taita (Kenya)
tg
Tajik
tg-Cyrl-TJ
Tajik (Cyrillic, Tajikistan)
ta
Tamil
ta-IN
Tamil (India)
ta-MY
Tamil (Malaysia)
ta-SG
Tamil (Singapore)
ta-LK
Tamil (Sri Lanka)
twq
Tasawaq
twq-NE
Tasawaq (Niger)
tt
Tatar
tt-RU
Tatar (Russia)
te
Telugu
te-IN
Telugu (India)
teo
Teso
teo-KE
Teso (Kenya)
teo-UG
Teso (Uganda)
th
Thai
th-TH
Thai (Thailand)
bo
Tibetan
bo-CN
Tibetan (China)
bo-IN
Tibetan (India)
tig
Tigre
tig-ER
Tigre (Eritrea)
ti
Tigrinya
ti-ER
Tigrinya (Eritrea)
ti-ET
Tigrinya (Ethiopia)
to
Tongan
to-TO
Tongan (Tonga)
tr
Turkish
tr-CY
Turkish (Cyprus)
tr-TR
Turkish (Turkey)
tk
Turkmen
tk-TM
Turkmen (Turkmenistan)
uk
Ukrainian
uk-UA
Ukrainian (Ukraine)
hsb
Upper Sorbian
hsb-DE
Upper Sorbian (Germany)
ur
Urdu
ur-IN
Urdu (India)
ur-PK
Urdu (Pakistan)
ug
Uyghur
ug-CN
Uyghur (China)
uz
Uzbek
uz-Arab
Uzbek
uz-Cyrl
Uzbek
uz-Latn
Uzbek
uz-Arab-AF
Uzbek (Arabic, Afghanistan)
uz-Cyrl-UZ
Uzbek (Cyrillic, Uzbekistan)
uz-Latn-UZ
Uzbek (Latin, Uzbekistan)
vai
Vai
vai-Latn
Vai
vai-Vaii
Vai
vai-Latn-LR
Vai (Latin, Liberia)
vai-Vaii-LR
Vai (Vai, Liberia)
ve
Venda
ve-ZA
Venda (South Africa)
vi
Vietnamese
vi-VN
Vietnamese (Vietnam)
vo
Volapük
vo-001
Volapük (World)
vun
Vunjo
vun-TZ
Vunjo (Tanzania)
wae
Walser
wae-CH
Walser (Switzerland)
cy
Welsh
cy-GB
Welsh (United Kingdom)
fy
Western Frisian
fy-NL
Western Frisian (Netherlands)
wal
Wolaytta
wal-ET
Wolaytta (Ethiopia)
wo
Wolof
wo-SN
Wolof (Senegal)
ts
Xitsonga
ts-ZA
Xitsonga (South Africa)
yav
Yangben
yav-CM
Yangben (Cameroon)
ii
Yi
ii-CN
Yi (China)
yi
Yiddish
yi-001
Yiddish (World)
yo
Yoruba
yo-BJ
Yoruba (Benin)
yo-NG
Yoruba (Nigeria)
dje
Zarma
dje-NE
Zarma (Niger)

@bergmania
Copy link
Member

Cool thanks :)

Then I think the solution is to use this code :) PR Incoming..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants