Google Translate set default language

Posted by tdurham on Stack Overflow See other posts from Stack Overflow or by tdurham
Published on 2009-11-20T22:44:34Z Indexed on 2012/10/06 9:38 UTC
Read the original article Hit count: 191

Filed under:
|
|
|

Maybe this has an obvious solution that I'm overlooking, but I can't seem to find the correct parameter to put in to make this happen. Using the Google Translate widget on a site, I need to set the default language that the user sees when entering the site, even though the site is english.

function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element'); }

I've tried adding: defaultLanguage: 'fr' and tried: targetLanguage: 'fr'

I did find some nice jQuery solutions, but didn't want to bypass this if it was an easy fix.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about google

Related posts about set