简体   繁体   中英

Google translate - changing back to previous language doesn't work

There seems to be a bug in Google translator which I am not able to get rid of. When we change the language, it works (web page gets translated to the desired language and the dropdown shows correct language), but when we try to switch to the previous language again, it does not work(it does not translate and shows 'select language' in the dropdown).

Same issue can be reproduced on any website having google translator.

eg: w3schools.com and sitepointstatic.com

Steps to reproduce :

  1. Change the language to Catalan - Works

  2. Change the language to English - Works

  3. Change the language to Catalan - Doesn't work

When I remove the default language setting pageLanguage: 'en' option, this seems to fix the issue.

To include English as the first select option, I included it as the first option in includedLanguages: 'en,am,bn,zh-CN' .

I'm not sure how stable this solution is and couldn't find anything in the docs and couldn't find the google translate code to see what's going on.

Any links would be much appreciated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM