Newsie v0.1.0 Newsie.Languages View Source
Basic provider of ISO-639 language codes and names
Current codes and English names
[
aa: "Afar",
ab: "Abkhazian",
af: "Afrikaans",
ak: "Akan",
am: "Amharic",
an: "Aragonese",
ar: "Arabic",
as: "Assamese",
av: "Avaric",
ay: "Aymara",
az: "Azerbaijani",
ba: "Bashkir",
be: "Belarusian",
bg: "Bulgarian",
bi: "Bislama",
bm: "Bambara",
bn: "Bengali",
bo: "Tibetan",
br: "Breton",
bs: "Bosnian",
ca: "Catalan",
ce: "Chechen",
ch: "Chamorro",
co: "Corsican",
cr: "Cree",
cs: "Czech",
cv: "Chuvash",
cy: "Welsh",
da: "Danish",
de: "German",
dv: "Dhivehi",
dz: "Dzongkha",
ee: "Ewe",
el: "Greek",
en: "English",
es: "Spanish",
et: "Estonian",
eu: "Basque",
fa: "Persian",
ff: "Fulah",
fi: "Finnish",
fj: "Fijian",
fo: "Faroese",
fr: "French",
fy: "Western Frisian",
ga: "Irish",
gd: "Scottish Gaelic",
gl: "Galician",
gn: "Guarani",
gu: "Gujarati",
gv: "Manx",
ha: "Hausa",
he: "Hebrew",
hi: "Hindi",
ho: "Hiri Motu",
hr: "Croatian",
ht: "Haitian",
hu: "Hungarian",
hy: "Armenian",
hz: "Herero",
id: "Indonesian",
ig: "Igbo",
ii: "Sichuan Yi",
ik: "Inupiaq",
is: "Icelandic",
it: "Italian",
iu: "Inuktitut",
ja: "Japanese",
jv: "Javanese",
ka: "Georgian",
kg: "Kongo",
ki: "Kikuyu",
kj: "Kuanyama",
kk: "Kazakh",
kl: "Kalaallisut",
km: "Khmer",
kn: "Kannada",
ko: "Korean",
kr: "Kanuri",
ks: "Kashmiri",
ku: "Kurdish",
kv: "Komi",
kw: "Cornish",
ky: "Kirghiz",
lb: "Luxembourgish",
lg: "Ganda",
li: "Limburgan",
ln: "Lingala",
lo: "Lao",
lt: "Lithuanian",
lu: "Luba-Katanga",
lv: "Latvian",
mg: "Malagasy",
mh: "Marshallese",
mi: "Maori",
mk: "Macedonian",
ml: "Malayalam",
mn: "Mongolian",
mr: "Marathi",
ms: "Malay",
mt: "Maltese",
my: "Burmese",
na: "Nauru",
nb: "Norwegian Bokmål",
nd: "North Ndebele",
ne: "Nepali",
ng: "Ndonga",
nl: "Dutch",
nn: "Norwegian Nynorsk",
no: "Norwegian",
nr: "South Ndebele",
nv: "Navajo",
ny: "Nyanja",
oc: "Occitan",
oj: "Ojibwa",
om: "Oromo",
or: "Oriya",
os: "Ossetian",
pa: "Panjabi",
pl: "Polish",
ps: "Pushto",
pt: "Portuguese",
qu: "Quechua",
rm: "Romansh",
rn: "Rundi",
ro: "Romanian",
ru: "Russian",
rw: "Kinyarwanda",
sc: "Sardinian",
sd: "Sindhi",
se: "Northern Sami",
sg: "Sango",
sh: "Serbo-Croatian",
si: "Sinhala",
sk: "Slovak",
sl: "Slovenian",
sm: "Samoan",
sn: "Shona",
so: "Somali",
sq: "Albanian",
sr: "Serbian",
ss: "Swati",
st: "Southern Sotho",
su: "Sundanese",
sv: "Swedish",
sw: "Swahili",
ta: "Tamil",
te: "Telugu",
tg: "Tajik",
th: "Thai",
ti: "Tigrinya",
tk: "Turkmen",
tl: "Tagalog",
tn: "Tswana",
to: "Tonga",
tr: "Turkish",
ts: "Tsonga",
tt: "Tatar",
tw: "Twi",
ty: "Tahitian",
ug: "Uighur",
uk: "Ukrainian",
ur: "Urdu",
uz: "Uzbek",
ve: "Venda",
vi: "Vietnamese",
wa: "Walloon",
wo: "Wolof",
xh: "Xhosa",
yi: "Yiddish",
yo: "Yoruba",
za: "Zhuang",
zh: "Chinese",
zu: "Zulu"
]
Link to this section Summary
Functions
Get the English name of a language based on its 2-letter language code
Convert a language name to ISO code
Validate an ISO-639 language code and convert it to the correct atom.
Link to this section Types
Link to this section Functions
Specs
Get the English name of a language based on its 2-letter language code
Example
iex> Newsie.Languages.code_to_name(:en)
"English"
iex> Newsie.Languages.code_to_name(:ja)
"Japanese"
iex> Newsie.Languages.code_to_name(:xx)
nil
Specs
iso_639() :: map()
Get a Map
of ISO-639 2-letter language codes and their English name.
Specs
Convert a language name to ISO code
Example
iex> Newsie.Languages.name_to_code("french")
:fr
iex> Newsie.Languages.name_to_code("English")
:en
iex> Newsie.Languages.name_to_code("Klingon")
nil
Specs
Validate an ISO-639 language code and convert it to the correct atom.
Invalid language codes will get nil
Examples
iex> Newsie.Languages.parse_code("en")
:en
iex> Newsie.Languages.parse_code("DE")
:de
iex> Newsie.Languages.parse_code(:ja)
:ja
iex> Newsie.Languages.parse_code("jp")
nil