Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GoogleTranslate module #519

Open
Prasanta-Hembram opened this issue Nov 14, 2024 · 5 comments
Open

Update GoogleTranslate module #519

Prasanta-Hembram opened this issue Nov 14, 2024 · 5 comments
Labels
questions Further information is requested

Comments

@Prasanta-Hembram
Copy link

Prasanta-Hembram commented Nov 14, 2024

Description:

The Linguist extension's Google Translate module likely relies on a static list of supported languages. As Google Translate's language support is expanding and needs to be updated manually regularly. Below are the sources where supported languages are updated regularly (even before google list them in their official website :-)).

@vitonsky
Copy link
Collaborator

What this issue about?

@Prasanta-Hembram Prasanta-Hembram changed the title Update Google Translate languages Update Google Translate module Nov 14, 2024
@Prasanta-Hembram Prasanta-Hembram changed the title Update Google Translate module Update GoogleTranslate module Nov 14, 2024
@Prasanta-Hembram
Copy link
Author

What this issue about?

I have updated, sorry forgot to add description and lack of clarity.

@vitonsky
Copy link
Collaborator

@Prasanta-Hembram thanks for update. Linguist uses languages defined in ISO-639-1 standard, but not languages supported by google, since Linguist is not just wrapper around Google rather it is replace for google translator.

What a reasons to add Languages into Linguist? Do you have some specific problem with languages list?

@Prasanta-Hembram
Copy link
Author

All those languages are not available in Linguist GoogleTranslate module, example Santali is present in defined in ISO-639-1 standard, but not in Linguist extention. If I have to update/add langauge like Santali to GoogelTranslate module how to do it.

@vitonsky
Copy link
Collaborator

@Prasanta-Hembram as i see there are no this language in vesrion 1 (2-letter code): https://github.com/vitonsky/ISO-639_langs/blob/a3611a49b8f6bb369734a03b36fa161114cce4ac/ISO-639-1/data.json#L2725-L2731

If this is incorrect and you have links that confirm it, we have to fix it.

Otherwise this language will not supported even if any translator support it.

This design decision is motivated by factors below

  • We have to localize languages Linguist support. Currently we set language names in localization files. As alternative way, it is possible to generate localized strings with Intl - browser API and in case we can't translate language - we should hide it, that may lead to inconsistency between browsers depends on languages list they support
  • 3-letter codes are confused and may have few codes for single language
  • Most sites uses ISO-639-1 for language definitions, so we have to map v1 language codes to v2 while translating, since if we would support 3-letter codes, some translators may use 3-letter codes in list of languages they support

@vitonsky vitonsky added the questions Further information is requested label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
questions Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants