mozhi/utils/langlist-watson.go

247 lines
2.9 KiB
Go
Raw Normal View History

2023-07-22 19:50:21 +05:30
package utils
func LangListWatson(listType string) []List {
// IDs got from https://www.loc.gov/standards/iso639-2/php/code_list.php and tested to make sure they work. Exceptions fr-CA zh-CN/TW
2023-08-27 19:54:30 +05:30
ListData := []List{
{
2023-07-22 19:50:21 +05:30
Id: "ar",
Name: "Arabic",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "ba",
Name: "Basque",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "bn",
Name: "Bengali",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "bs",
Name: "Bosnian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "bg",
Name: "Bulgarian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "ca",
Name: "Catalan",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "zh",
Name: "Chinese (Simplified)",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "zh-TW",
Name: "Chinese (Traditional)",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "hr",
Name: "Croatian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "cs",
Name: "Czech",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "da",
Name: "Danish",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "nl",
Name: "Dutch",
},
2023-08-27 19:54:30 +05:30
{
Id: "en",
Name: "English",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "et",
Name: "Estonian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "fi",
Name: "Finnish",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "fr",
Name: "French",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "fr-CA",
Name: "Canadian French",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "de",
Name: "German",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "el",
Name: "Greek",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "gu",
Name: "Gujarati",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "he",
Name: "Hebrew",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "hi",
Name: "Hindi",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "hu",
Name: "Hungarian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "id",
Name: "Indonesian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "ga",
Name: "Irish",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "it",
Name: "Italian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "ja",
Name: "Japanese",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "kn",
Name: "Kannada",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "ko",
Name: "Korean",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "lv",
Name: "Latvian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "lt",
Name: "Lithuanian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "ms",
Name: "Malay",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "ml",
Name: "Malayalam",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "mt",
Name: "Maltese",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "mr",
Name: "Marathi",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "cnr",
Name: "Montenegrin",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "ne",
Name: "Nepali",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "nb",
Name: "Norwegian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "pl",
Name: "Polish",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "pt",
Name: "Portugese",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "pa",
Name: "Punjabi",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "ro",
Name: "Romanian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "ru",
Name: "Russian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "sr",
Name: "Serbian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "si",
Name: "Sinhalese",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "sk",
Name: "Slovak",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "sl",
Name: "Slovenian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "es",
Name: "Spanish",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "sv",
Name: "Swedish",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "ta",
Name: "Tamil",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "te",
Name: "Telugu",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "th",
Name: "Thai",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "tr",
Name: "Turkish",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "uk",
Name: "Ukrainian",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "ur",
Name: "Urdu",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "vi",
Name: "Vietnamese",
},
2023-08-27 19:54:30 +05:30
{
2023-07-22 19:50:21 +05:30
Id: "cy",
Name: "Welsh",
},
}
2023-08-27 22:28:34 +05:30
var ListD []List
if listType == "sl" {
2023-08-27 22:28:34 +05:30
auto := []List{{
Id: "auto",
Name: "Detect Language",
2023-08-27 22:28:34 +05:30
}}
ListD = append(append([]List{}, auto...), ListData...)
2023-08-28 20:41:57 +05:30
} else {
ListD = ListData
}
2023-08-27 22:28:34 +05:30
return ListD
2023-07-22 19:50:21 +05:30
}