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'/>
6
  • Here’s how you can disable the translation: stackoverflow.com/a/7229002/2029790. But not sure if you can detect if a person is using English/French and then disable it. Feb 25, 2016 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, 2016 at 22:07
  • Perhaps this answer helps you detect the translation: stackoverflow.com/a/4889433/2029790 Feb 25, 2016 at 22:55
  • @VincentOrback Thanks, came across that one. Seems outdated.
    – bart
    Feb 25, 2016 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? Feb 25, 2016 at 23:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.