-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharray_json_langcodes.js
More file actions
34 lines (32 loc) · 1.89 KB
/
array_json_langcodes.js
File metadata and controls
34 lines (32 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const languageCodes = [
"af", "sq", "am", "ar", "hy", "as", "ay", "az", "bm", "eu", "be", "bn",
"bho", "bs", "bg", "ca", "ceb", "zh-CN", "zh-TW", "co", "hr", "cs", "da",
"dv", "doi", "nl", "en", "eo", "et", "ee", "fil", "fi", "fr", "fy", "gl",
"ka", "de", "el", "gn", "gu", "ht", "ha", "haw", "he", "hi", "hmn", "hu",
"is", "ig", "ilo", "id", "ga", "it", "ja", "jw", "kn", "kk", "km", "rw",
"gom", "ko", "kri", "ku", "ckb", "ky", "lo", "la", "lv", "ln", "lt", "lg",
"lb", "mk", "mai", "mg", "ms", "ml", "mt", "mi", "mr", "mni-Mtei", "lus",
"mn", "my", "ne", "no", "ny", "or", "om", "ps", "fa", "pl", "pt", "pa",
"qu", "ro", "ru", "sm", "sa", "gd", "nso", "sr", "st", "sn", "sd", "si",
"sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te",
"th", "ti", "ts", "tr", "tk", "ak", "uk", "ur", "ug", "uz", "vi", "cy",
"xh", "yi", "yo", "zu"
];
// Check language is valid or not from array
function checkLangAvailable(inputLang) {
const languageCodesList = [
"af", "sq", "am", "ar", "hy", "as", "ay", "az", "bm", "eu", "be", "bn",
"bho", "bs", "bg", "ca", "ceb", "zh-CN", "zh-TW", "co", "hr", "cs", "da",
"dv", "doi", "nl", "en", "eo", "et", "ee", "fil", "fi", "fr", "fy", "gl",
"ka", "de", "el", "gn", "gu", "ht", "ha", "haw", "he", "hi", "hmn", "hu",
"is", "ig", "ilo", "id", "ga", "it", "ja", "jw", "kn", "kk", "km", "rw",
"gom", "ko", "kri", "ku", "ckb", "ky", "lo", "la", "lv", "ln", "lt", "lg",
"lb", "mk", "mai", "mg", "ms", "ml", "mt", "mi", "mr", "mni-Mtei", "lus",
"mn", "my", "ne", "no", "ny", "or", "om", "ps", "fa", "pl", "pt", "pa",
"qu", "ro", "ru", "sm", "sa", "gd", "nso", "sr", "st", "sn", "sd", "si",
"sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te",
"th", "ti", "ts", "tr", "tk", "ak", "uk", "ur", "ug", "uz", "vi", "cy",
"xh", "yi", "yo", "zu"
];
return languageCodesList.includes(inputLang.toString()); // return true or false
}