mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 05:37:44 +00:00
Add all supported languages to Google Translate and remove unsupported ones (#107404)
* Adding supported language codes from Google Translate Added all languages that Google Translate supports. * Corrected alphabetical order of languages * Remove languages not actually supported for speech Previously I added languages supported by Google Translate. Based on comments received, I manually verified each language, and removed languages that are not actually supported for speech in Google Translate. * Add instructions to update the list of supported languages Added instructions as suggested so as to facilitate easier update on this list. * Reformat comment in const.py --------- Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
parent
f8c38fad00
commit
79d6c2e75a
@ -7,8 +7,25 @@ DEFAULT_LANG = "en"
|
||||
DEFAULT_TLD = "com"
|
||||
DOMAIN = "google_translate"
|
||||
|
||||
# INSTRUCTIONS TO UPDATE LIST:
|
||||
#
|
||||
# Removal:
|
||||
# Removal is as simple as deleting the line containing the language code no longer
|
||||
# supported.
|
||||
#
|
||||
# Addition:
|
||||
# In order to add to this list, follow the below steps:
|
||||
# 1. Find out if the language is supported: Go to Google Translate website and try
|
||||
# translating any word from English into your desired language.
|
||||
# If the "speech" icon is grayed out or no speech is generated, the language is
|
||||
# not supported and cannot be added. Otherwise, proceed:
|
||||
# 2. Grab the language code from https://cloud.google.com/translate/docs/languages
|
||||
# 3. Add the language code in SUPPORT_LANGUAGES, making sure to not disturb the
|
||||
# alphabetical nature of the list.
|
||||
|
||||
SUPPORT_LANGUAGES = [
|
||||
"af",
|
||||
"am",
|
||||
"ar",
|
||||
"bg",
|
||||
"bn",
|
||||
@ -20,16 +37,18 @@ SUPPORT_LANGUAGES = [
|
||||
"de",
|
||||
"el",
|
||||
"en",
|
||||
"eo",
|
||||
"es",
|
||||
"et",
|
||||
"eu",
|
||||
"fi",
|
||||
"fil",
|
||||
"fr",
|
||||
"gl",
|
||||
"gu",
|
||||
"ha",
|
||||
"hi",
|
||||
"hr",
|
||||
"hu",
|
||||
"hy",
|
||||
"id",
|
||||
"is",
|
||||
"it",
|
||||
@ -40,15 +59,16 @@ SUPPORT_LANGUAGES = [
|
||||
"kn",
|
||||
"ko",
|
||||
"la",
|
||||
"lv",
|
||||
"lt",
|
||||
"mk",
|
||||
"lv",
|
||||
"ml",
|
||||
"mr",
|
||||
"ms",
|
||||
"my",
|
||||
"ne",
|
||||
"nl",
|
||||
"no",
|
||||
"pa",
|
||||
"pl",
|
||||
"pt",
|
||||
"ro",
|
||||
|
Loading…
x
Reference in New Issue
Block a user