# List of locales supported by Microsoft translator for LocalizationEditor : MIT License
# @author Vladimir Petrenko
# @see https://translator.microsoft.com/
class_name LocalizationAutoTranslateMicrosoft

const LOCALES = {
	"af": "Afrikaans",
	"sq": "Albanian",
	"am": "Amharic",
	"ar": "Arabic",
	"hy": "Armenian",
	"as": "Assamese",
	"az": "Azerbaijani (Latin)",
	"bn": "Bangla",
	"ba": "Bashkir",
	"eu": "Basque",
	"bs": "Bosnian (Latin)",
	"bg": "Bulgarian",
	"yue": "Cantonese (Traditional)",
	"ca": "Catalan",
	"lzh": "Chinese (Literary)",
	"zh-Hans": "Chinese Simplified",
	"zh-Hant": "Chinese Traditional",
	"hr": "Croatian",
	"cs": "Czech",
	"da": "Danish",
	"prs": "Dari",
	"dv": "Divehi",
	"nl": "Dutch",
	"en": "English",
	"et": "Estonian",
	"fo": "Faroese",
	"fj": "Fijian",
	"fil": "Filipino",
	"fi": "Finnish",
	"fr": "French",
	"fr-ca": "French (Canada)",
	"gl": "Galician",
	"ka": "Georgian",
	"de": "German",
	"el": "Greek",
	"gu": "Gujarati",
	"ht": "Haitian Creole",
	"he": "Hebrew",
	"hi": "Hindi",
	"mww": "Hmong Daw (Latin)",
	"hu": "Hungarian",
	"is": "Icelandic",
	"id": "Indonesian",
	"ikt": "Inuinnaqtun",
	"iu": "Inuktitut",
	"iu-Latn": "Inuktitut (Latin)",
	"ga": "Irish",
	"it": "Italian",
	"ja": "Japanese",
	"kn": "Kannada",
	"kk": "Kazakh",
	"km": "Khmer",
	"tlh-Latn": "Klingon",
	"tlh-Piqd": "Klingon (plqaD)",
	"ko": "Korean",
	"ku": "Kurdish (Central)",
	"kmr": "Kurdish (Northern)",
	"ky": "Kyrgyz (Cyrillic)",
	"lo": "Lao",
	"lv": "Latvian",
	"lt": "Lithuanian",
	"mk": "Macedonian",
	"mg": "Malagasy",
	"ms": "Malay (Latin)",
	"ml": "Malayalam",
	"mt": "Maltese",
	"mi": "Maori",
	"mr": "Marathi",
	"mn-Cyrl": "Mongolian (Cyrillic)",
	"mn-Mong": "Mongolian (Traditional)",
	"my": "Myanmar",
	"ne": "Nepali",
	"nb": "Norwegian",
	"or": "Odia",
	"ps": "Pashto",
	"fa": "Persian",
	"pl": "Polish",
	"pt": "Portuguese (Brazil)",
	"pt-pt": "Portuguese (Portugal)",
	"pa": "Punjabi",
	"otq": "Queretaro Otomi",
	"ro": "Romanian",
	"ru": "Russian",
	"sm": "Samoan (Latin)",
	"sr-Cyrl": "Serbian (Cyrillic)",
	"sr-Latn": "Serbian (Latin)",
	"sk": "Slovak",
	"sl": "Slovenian",
	"so": "Somali (Arabic)",
	"es": "Spanish",
	"sw": "Swahili (Latin)",
	"sv": "Swedish",
	"ty": "Tahitian",
	"ta": "Tamil",
	"tt": "Tatar (Latin)",
	"te": "Telugu",
	"th": "Thai",
	"bo": "Tibetan",
	"ti": "Tigrinya",
	"to": "Tongan",
	"tr": "Turkish",
	"tk": "Turkmen (Latin)",
	"uk": "Ukrainian",
	"hsb": "Upper Sorbian",
	"ur": "Urdu",
	"ug": "Uyghur (Arabic)",
	"uz": "Uzbek (Latin)",
	"vi": "Vietnamese",
	"cy": "Welsh",
	"yua": "Yucatec Maya",
	"zu": "Zulu"
}

static func label_by_code(code: String) -> String:
	if LOCALES.has(code.to_lower()):
		return code + " " + LOCALES[code.to_lower()]
	return ""
