# List of locales supported by Yandex translator for LocalizationEditor : MIT License
# @author Vladimir Petrenko
# @see https://www.deepl.com/docs-api/translate-text/translate-text/
class_name LocalizationAutoTranslateYandex

const LOCALES = {
	"az": "Azerbaijani",
	"sq": "Albanian",
	"am": "Amharic",
	"en": "English",
	"ar": "Arabic",
	"hy": "Armenian",
	"af": "Afrikaans",
	"eu": "Basque",
	"ba": "Bashkir",
	"be": "Belarusian",
	"bn": "Bengal",
	"my": "Burmese",
	"bg": "Bulgarian",
	"bs": "Bosnian",
	"cy": "Welsh",
	"hu": "Hungarian",
	"vi": "Vietnamese",
	"ht": "Haitian (Creole)",
	"gl": "Galician",
	"nl": "Dutch",
	"mrj": "Hill Mari",
	"el": "Greek",
	"ka": "Georgian",
	"gu": "Gujarati",
	"da": "Danish",
	"he": "Hebrew",
	"yi": "Yiddish",
	"id": "Indonesian",
	"ga": "Irish",
	"it": "Italian",
	"is": "Icelandic",
	"es": "Spanish",
	"kk": "Kazakh",
	"kn": "Kannada",
	"ca": "Catalan",
	"ky": "Kirghiz",
	"zh": "Chinese",
	"ko": "Korean",
	"xh": "Xhosa",
	"km": "Khmer",
	"lo": "Laotian",
	"la": "Latin",
	"lv": "Latvian",
	"lt": "Lithuanian",
	"lb": "Luxembourg",
	"mg": "Malagasy",
	"ms": "Malay",
	"ml": "Malayalam",
	"mt": "Maltese",
	"mk": "Macedonian",
	"mi": "Maori",
	"mr": "Marathi",
	"mhr": "Mari",
	"mn": "Mongolian",
	"de": "German",
	"ne": "Nepalese",
	"no": "Norwegian",
	"pa": "Punjabi",
	"pap": "Papiamento",
	"fa": "Persian",
	"pl": "Polish",
	"pt": "Portuguese",
	"ro": "Romanian",
	"ru": "Russian",
	"ceb": "Cebuano",
	"sr": "Serbian",
	"si": "Sinhalese",
	"sk": "Slovak",
	"sl": "Slovenian",
	"sw": "Swahili",
	"su": "Sundanese",
	"tg": "Tajik",
	"th": "Thai",
	"tl": "Tagalog",
	"ta": "Tamil",
	"tt": "Tartar",
	"te": "Telugu",
	"tr": "Turkish",
	"udm": "Udmurt",
	"uz": "Uzbek",
	"uk": "Ukrainian",
	"ur": "Urdu",
	"fi": "Finnish",
	"fr": "French",
	"hi": "Hindi",
	"hr": "Croatian",
	"cs": "Czech",
	"sv": "Swedish",
	"gd": "Scottish",
	"et": "Estonian",
	"eo": "Esperanto",
	"jv": "Javanese",
	"ja": "Japanese"
}

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