translate-shell icon indicating copy to clipboard operation
translate-shell copied to clipboard

Support for recently added 110 new languages on Google Translate

Open khlsvr opened this issue 1 year ago • 1 comments

Google has added a lot of new languages. Translating to/from some of them doesn't seem to work out of the box. [WARNING] Unknown target language code: jam

https://blog.google/products/translate/google-translate-new-languages-2024/

$ trans -U Current version: 0.9.7.1 Already up-to-date.

khlsvr avatar Jul 12 '24 09:07 khlsvr

I'm aware that these new language codes will raise a 400 error from Google's side. In fact, all of them won't work out of the box, and some of them do work because they're supported alternatively by Bing.

trans uses the same legacy API that Google Chrome/Chromium in-browser translation uses. The newly added 110 languages have not landed in this API yet, as you can see from Chrome's "translate to" function that none of these 110 languages has appeared (e.g., Abkhaz)

I'll wait a while and see if Google will support them in-browser, otherwise it may take some time to do the hack.

soimort avatar Jul 12 '24 13:07 soimort