hippofish/packages/client/src/scripts/langmap.ts

451 lines
6.7 KiB
TypeScript
Raw Normal View History

// TODO: sharedに置いてバックエンドのと統合したい
export const iso639Langs1 = {
2023-01-13 05:40:33 +01:00
af: {
nativeName: "Afrikaans",
},
2023-01-13 05:40:33 +01:00
ak: {
nativeName: "Tɕɥi",
},
2023-01-13 05:40:33 +01:00
ar: {
nativeName: "العربية",
2023-12-26 21:43:44 +01:00
rtl: true,
},
ay: {
2023-01-13 05:40:33 +01:00
nativeName: "Aymar aru",
},
2023-01-13 05:40:33 +01:00
az: {
nativeName: "Azərbaycan dili",
},
be: {
2023-01-13 05:40:33 +01:00
nativeName: "Беларуская",
},
2023-01-13 05:40:33 +01:00
bg: {
nativeName: "Български",
},
2023-01-13 05:40:33 +01:00
bn: {
nativeName: "বাংলা",
},
2023-01-13 05:40:33 +01:00
br: {
nativeName: "Brezhoneg",
},
bs: {
2023-01-13 05:40:33 +01:00
nativeName: "Bosanski",
},
2023-01-13 05:40:33 +01:00
ca: {
nativeName: "Català",
},
2023-01-13 05:40:33 +01:00
cs: {
nativeName: "Čeština",
},
2023-01-13 05:40:33 +01:00
cy: {
nativeName: "Cymraeg",
},
2023-01-13 05:40:33 +01:00
da: {
nativeName: "Dansk",
},
2023-01-13 05:40:33 +01:00
de: {
nativeName: "Deutsch",
},
2023-01-13 05:40:33 +01:00
el: {
nativeName: "Ελληνικά",
},
2023-01-13 05:40:33 +01:00
en: {
nativeName: "English",
},
2023-01-13 05:40:33 +01:00
eo: {
nativeName: "Esperanto",
},
2023-01-13 05:40:33 +01:00
es: {
nativeName: "Español",
},
2023-01-13 05:40:33 +01:00
et: {
nativeName: "eesti keel",
},
2023-01-13 05:40:33 +01:00
eu: {
nativeName: "Euskara",
},
2023-01-13 05:40:33 +01:00
fa: {
nativeName: "فارسی",
2023-12-26 21:43:44 +01:00
rtl: true,
},
2023-01-13 05:40:33 +01:00
ff: {
nativeName: "Fulah",
},
2023-01-13 05:40:33 +01:00
fi: {
nativeName: "Suomi",
},
2023-01-13 05:40:33 +01:00
fo: {
nativeName: "Føroyskt",
},
2023-01-13 05:40:33 +01:00
fr: {
nativeName: "Français",
},
fy: {
2023-01-13 05:40:33 +01:00
nativeName: "Frysk",
},
2023-01-13 05:40:33 +01:00
ga: {
nativeName: "Gaeilge",
},
2023-01-13 05:40:33 +01:00
gd: {
nativeName: "Gàidhlig",
},
2023-01-13 05:40:33 +01:00
gl: {
nativeName: "Galego",
},
gn: {
2023-01-13 05:40:33 +01:00
nativeName: "Avañe'ẽ",
},
gu: {
2023-01-13 05:40:33 +01:00
nativeName: "ગુજરાતી",
},
2023-01-13 05:40:33 +01:00
gv: {
nativeName: "Gaelg",
},
2023-01-13 05:40:33 +01:00
he: {
nativeName: "עברית‏",
2023-12-26 21:43:44 +01:00
rtl: true,
},
2023-01-13 05:40:33 +01:00
hi: {
nativeName: "हिन्दी",
},
2023-01-13 05:40:33 +01:00
hr: {
nativeName: "Hrvatski",
},
2023-01-13 05:40:33 +01:00
ht: {
nativeName: "Kreyòl",
},
2023-01-13 05:40:33 +01:00
hu: {
nativeName: "Magyar",
},
2023-01-13 05:40:33 +01:00
hy: {
nativeName: "Հայերեն",
},
2023-01-13 05:40:33 +01:00
id: {
nativeName: "Bahasa Indonesia",
},
2023-01-13 05:40:33 +01:00
is: {
nativeName: "Íslenska",
},
2023-01-13 05:40:33 +01:00
it: {
nativeName: "Italiano",
},
2023-01-13 05:40:33 +01:00
ja: {
nativeName: "日本語",
},
jv: {
2023-01-13 05:40:33 +01:00
nativeName: "Basa Jawa",
},
ka: {
2023-01-13 05:40:33 +01:00
nativeName: "ქართული",
},
kk: {
2023-01-13 05:40:33 +01:00
nativeName: "Қазақша",
},
2023-01-13 05:40:33 +01:00
kl: {
nativeName: "kalaallisut",
},
km: {
2023-01-13 05:40:33 +01:00
nativeName: "ភាសាខ្មែរ",
},
2023-01-13 05:40:33 +01:00
kn: {
nativeName: "ಕನ್ನಡ",
},
2023-01-13 05:40:33 +01:00
ko: {
nativeName: "한국어",
},
ku: {
2023-01-13 05:40:33 +01:00
nativeName: "Kurdî",
},
2023-01-13 05:40:33 +01:00
kw: {
nativeName: "Kernewek",
},
2023-01-13 05:40:33 +01:00
la: {
nativeName: "Latin",
},
2023-01-13 05:40:33 +01:00
lb: {
nativeName: "Lëtzebuergesch",
},
li: {
2023-01-13 05:40:33 +01:00
nativeName: "Lèmbörgs",
},
2023-01-13 05:40:33 +01:00
lt: {
nativeName: "Lietuvių",
},
2023-01-13 05:40:33 +01:00
lv: {
nativeName: "Latviešu",
},
mg: {
2023-01-13 05:40:33 +01:00
nativeName: "Malagasy",
},
2023-01-13 05:40:33 +01:00
mk: {
nativeName: "Македонски",
},
2023-01-13 05:40:33 +01:00
ml: {
nativeName: "മലയാളം",
},
mn: {
2023-01-13 05:40:33 +01:00
nativeName: "Монгол",
},
2023-01-13 05:40:33 +01:00
mr: {
nativeName: "मराठी",
},
2023-01-13 05:40:33 +01:00
ms: {
nativeName: "Bahasa Melayu",
},
2023-01-13 05:40:33 +01:00
mt: {
nativeName: "Malti",
},
2023-01-13 05:40:33 +01:00
my: {
nativeName: "ဗမာစကာ",
},
2023-01-13 05:40:33 +01:00
no: {
nativeName: "Norsk",
},
2023-01-13 05:40:33 +01:00
nb: {
nativeName: "Norsk (bokmål)",
},
2023-01-13 05:40:33 +01:00
ne: {
nativeName: "नेपाली",
},
2023-01-13 05:40:33 +01:00
nl: {
nativeName: "Nederlands",
},
nn: {
2023-01-13 05:40:33 +01:00
nativeName: "Norsk (nynorsk)",
},
2023-01-13 05:40:33 +01:00
oc: {
nativeName: "Occitan",
},
or: {
2023-01-13 05:40:33 +01:00
nativeName: "ଓଡ଼ିଆ",
},
2023-01-13 05:40:33 +01:00
pa: {
nativeName: "ਪੰਜਾਬੀ",
},
2023-01-13 05:40:33 +01:00
pl: {
nativeName: "Polski",
},
ps: {
2023-01-13 05:40:33 +01:00
nativeName: "پښتو",
2023-12-26 21:43:44 +01:00
rtl: true,
},
2023-01-13 05:40:33 +01:00
pt: {
nativeName: "Português",
},
qu: {
2023-01-13 05:40:33 +01:00
nativeName: "Qhichwa",
},
rm: {
2023-01-13 05:40:33 +01:00
nativeName: "Rumantsch",
},
2023-01-13 05:40:33 +01:00
ro: {
nativeName: "Română",
},
2023-01-13 05:40:33 +01:00
ru: {
nativeName: "Русский",
},
sa: {
2023-01-13 05:40:33 +01:00
nativeName: "संस्कृतम्",
},
se: {
2023-01-13 05:40:33 +01:00
nativeName: "Davvisámegiella",
},
2023-01-13 05:40:33 +01:00
sh: {
nativeName: "српскохрватски",
},
si: {
2023-01-13 05:40:33 +01:00
nativeName: "සිංහල",
},
2023-01-13 05:40:33 +01:00
sk: {
nativeName: "Slovenčina",
},
2023-01-13 05:40:33 +01:00
sl: {
nativeName: "Slovenščina",
},
so: {
2023-01-13 05:40:33 +01:00
nativeName: "Soomaaliga",
},
2023-01-13 05:40:33 +01:00
sq: {
nativeName: "Shqip",
},
2023-01-13 05:40:33 +01:00
sr: {
nativeName: "Српски",
},
2023-01-13 05:40:33 +01:00
su: {
nativeName: "Basa Sunda",
},
2023-01-13 05:40:33 +01:00
sv: {
nativeName: "Svenska",
},
2023-01-13 05:40:33 +01:00
sw: {
nativeName: "Kiswahili",
},
2023-01-13 05:40:33 +01:00
ta: {
nativeName: "தமிழ்",
},
2023-01-13 05:40:33 +01:00
te: {
nativeName: "తెలుగు",
},
2023-01-13 05:40:33 +01:00
tg: {
nativeName: "забо́ни тоҷикӣ́",
},
2023-01-13 05:40:33 +01:00
th: {
nativeName: "ภาษาไทย",
},
2023-01-13 05:40:33 +01:00
tr: {
nativeName: "Türkçe",
},
tt: {
2023-01-13 05:40:33 +01:00
nativeName: "татарча",
},
2023-01-13 05:40:33 +01:00
uk: {
nativeName: "Українська",
},
2023-01-13 05:40:33 +01:00
ur: {
nativeName: "اردو",
2023-12-26 21:43:44 +01:00
rtl: true,
},
2023-01-13 05:40:33 +01:00
uz: {
nativeName: "O'zbek",
},
2023-01-13 05:40:33 +01:00
vi: {
nativeName: "Tiếng Việt",
},
xh: {
2023-01-13 05:40:33 +01:00
nativeName: "isiXhosa",
},
2023-01-13 05:40:33 +01:00
yi: {
nativeName: "ייִדיש",
2023-12-26 21:43:44 +01:00
rtl: true,
},
2023-01-13 05:40:33 +01:00
zh: {
nativeName: "中文",
},
zu: {
nativeName: "isiZulu",
},
};
export const iso639Langs3 = {
ach: {
nativeName: "Lwo",
},
ady: {
nativeName: "Адыгэбзэ",
},
cak: {
nativeName: "Maya Kaqchikel",
},
chr: {
nativeName: "ᏣᎳᎩ (tsalagi)",
},
dsb: {
nativeName: "Dolnoserbšćina",
},
fil: {
nativeName: "Filipino",
},
hsb: {
nativeName: "Hornjoserbšćina",
},
kab: {
nativeName: "Taqbaylit",
},
mai: {
nativeName: "मैथिली, মৈথিলী",
},
tlh: {
nativeName: "tlhIngan-Hol",
},
tok: {
nativeName: "Toki Pona",
},
yue: {
nativeName: "粵語",
},
nan: {
nativeName: "閩南語",
},
};
export const langmapNoRegion = Object.assign({}, iso639Langs1, iso639Langs3);
export const iso639Regional = {
"zh-hans": {
nativeName: "中文(简体)",
},
"zh-hant": {
nativeName: "中文(繁體)",
},
};
export const langmap = Object.assign({}, langmapNoRegion, iso639Regional);
2024-03-24 04:00:49 +01:00
/**
* @see https://github.com/komodojp/tinyld/blob/develop/docs/langs.md
*/
export const supportedLangs: Record<string, boolean> = {
af: true, afr: true,
am: true, amh: true,
ber: true,
rn: true, run: true,
my: true, mya: true,
id: true, ind: true,
km: true, khm: true,
tl: true, tgl: true,
th: true, tha: true,
vi: true, vie: true,
zh: true, cmn: true,
ja: true, jpn: true,
ko: true, kor: true,
bn: true, ben: true,
gu: true, guj: true,
hi: true, hin: true,
kn: true, kan: true,
ta: true, tam: true,
te: true, tel: true,
ur: true, urd: true,
cs: true, ces: true,
el: true, ell: true,
la: true, lat: true,
mk: true, mkd: true,
sr: true, srp: true,
sk: true, slk: true,
be: true, bel: true,
bg: true, bul: true,
et: true, est: true,
hu: true, hun: true,
lv: true, lvs: true,
lt: true, lit: true,
pl: true, pol: true,
ro: true, ron: true,
ru: true, rus: true,
uk: true, ukr: true,
da: true, dan: true,
fi: true, fin: true,
is: true, isl: true,
no: true, nob: true,
sv: true, swe: true,
nl: true, nld: true,
en: true, eng: true,
fr: true, fra: true,
de: true, deu: true,
ga: true, gle: true,
it: true, ita: true,
pt: true, por: true,
es: true, spa: true,
ar: true, ara: true,
hy: true, hye: true,
he: true, heb: true,
kk: true, kaz: true,
mn: true, mon: true,
fa: true, pes: true,
tt: true, tat: true,
tr: true, tur: true,
tk: true, tuk: true,
yi: true, yid: true,
eo: true, epo: true,
tlh: true,
vo: true, vol: true,
}