Open Prasanta-Hembram opened 1 year ago
Currently, Linguist supports only 2-letter ISO-639-1 language codes.
As i see, ISO 639-2 language codes have sat
code. To fix the problem, we have to supports ISO 639-2 language codes. Also, we should to update custom translators docs.
We have to ensure ISO 639-1 language codes will works fine too, to implement it, we have to add mapper for ISO codes.
This problem serious, i will fix it as soon as possible and will release in next hot fix update. Thank you for report.
return fetch(
${this.apiPath}?q=${text}&langpair=${from}|${to}
, {
to
return fetch(
${this.apiPath}?q=${text}&langpair=${from}|sat
, {
I have found a quick workaround, if we replace variable ${to} with simply a language code (three letter) then it is working fine. then select any language from the target language it will translate it properly in that desired language.
Description
I have created a custom translator that uses the Mymemory API for translation. Thanks to @AlphaBack for making it work! However, when I add the translator to the custom translator list of the extension, languages such as Santali (code: sat), which Mymemory supports, do not display in the drop-down menu when I am translating using the extension.
Steps
Copy the below custom translator code of Mymemory. (Added Santali for demo)
MyMemoryTranslator;