crow-translate / QOnlineTranslator

A library for Qt5 that provides free usage of Google, Yandex and Bing translate API.
GNU General Public License v3.0
79 stars 12 forks source link

Google Translate TTS British English support #40

Closed Crissium closed 1 year ago

Crissium commented 1 year ago

Google Translate TTS API supports British pronunciation. The language code is en-gb. But I do not think Google would translate into British English.

Try this: squirrel

Since this project already differentiates between Simplified and Traditional Chinese, it would seem unfair not to differentiate between [ˈskwɪrəl] and [ˈskwər(-ə)l] ;)

Crissium commented 1 year ago

Maybe only adding a new language code BritishEnglish, "en-gb" to QOnlineTranslator::s_googleLanguageCodes would do? It may not be necessary to modify {English, QStringLiteral("en")} in QOnlineTranslator::s_genericLanguageCodes, since en nowadays defaults to en-us everywhere. Damn the Yanks!

Shatur commented 1 year ago

Sounds like a nice idea. Feel free to try it and send a PR if it works!