mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +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"
|
DEFAULT_TLD = "com"
|
||||||
DOMAIN = "google_translate"
|
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 = [
|
SUPPORT_LANGUAGES = [
|
||||||
"af",
|
"af",
|
||||||
|
"am",
|
||||||
"ar",
|
"ar",
|
||||||
"bg",
|
"bg",
|
||||||
"bn",
|
"bn",
|
||||||
@ -20,16 +37,18 @@ SUPPORT_LANGUAGES = [
|
|||||||
"de",
|
"de",
|
||||||
"el",
|
"el",
|
||||||
"en",
|
"en",
|
||||||
"eo",
|
|
||||||
"es",
|
"es",
|
||||||
"et",
|
"et",
|
||||||
|
"eu",
|
||||||
"fi",
|
"fi",
|
||||||
|
"fil",
|
||||||
"fr",
|
"fr",
|
||||||
|
"gl",
|
||||||
"gu",
|
"gu",
|
||||||
|
"ha",
|
||||||
"hi",
|
"hi",
|
||||||
"hr",
|
"hr",
|
||||||
"hu",
|
"hu",
|
||||||
"hy",
|
|
||||||
"id",
|
"id",
|
||||||
"is",
|
"is",
|
||||||
"it",
|
"it",
|
||||||
@ -40,15 +59,16 @@ SUPPORT_LANGUAGES = [
|
|||||||
"kn",
|
"kn",
|
||||||
"ko",
|
"ko",
|
||||||
"la",
|
"la",
|
||||||
"lv",
|
|
||||||
"lt",
|
"lt",
|
||||||
"mk",
|
"lv",
|
||||||
"ml",
|
"ml",
|
||||||
"mr",
|
"mr",
|
||||||
|
"ms",
|
||||||
"my",
|
"my",
|
||||||
"ne",
|
"ne",
|
||||||
"nl",
|
"nl",
|
||||||
"no",
|
"no",
|
||||||
|
"pa",
|
||||||
"pl",
|
"pl",
|
||||||
"pt",
|
"pt",
|
||||||
"ro",
|
"ro",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user