2

My website is available in English and French, but I still see people using Google Website Translator. How can I detect whether Google Website Translator is being used and tell users that the site is available in English and French?

On a side note, why does Google Website Translator ignore the below tag?

<link rel='alternate' hreflang='en' href='https://www.example.com/?lang=en'/>
bart
  • 14,958
  • 21
  • 75
  • 105
  • Here’s how you can disable the translation: http://stackoverflow.com/a/7229002/2029790. But not sure if you can detect if a person is using English/French and then disable it. – Vincent Orback Feb 25 '16 at 21:11
  • I don't necessarily want to disable it. Instead I want to show a message with a link to the translated version. – bart Feb 25 '16 at 22:07
  • Perhaps this answer helps you detect the translation: http://stackoverflow.com/a/4889433/2029790 – Vincent Orback Feb 25 '16 at 22:55
  • @VincentOrback Thanks, came across that one. Seems outdated. – bart Feb 25 '16 at 23:06
  • Well, at least you know that a class will be added so you could do something like `.translated-ltr .translation-links, .translated-rtl .translation-links{ display: block}` and show some links to your custom translation right? – Vincent Orback Feb 25 '16 at 23:14
  • @VincentOrback Just checked and the only class that's being added to the tag is: e_md nj. Not sure what these stand for. – bart Feb 26 '16 at 00:13

0 Answers0