WordPress.org

Ready to get started?Download WordPress

Forums

Google Language Translator
[resolved] The plugin assumes that the web is by default in english (7 posts)

  1. hodeidesign
    Member
    Posted 1 year ago #

    My website is by default in Spanish and when I try to translate it in English I can't because it doesn't show English language on the list.

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

    Here I change \'en\' for \'es\' an it works. So I think you should use a variable and not a string to determine the language of the website.

    Bye bye :))

    http://wordpress.org/extend/plugins/google-language-translator/

  2. Rob Myrick
    Member
    Plugin Author

    Posted 1 year ago #

    Hi hodeidesign,

    Yes, you are absolutely right - and thank you for posting your code for everyone to see. I apologize to everyone for not taking care of this in my initial releases/updates. My next update will fix this problem for sure.

    Coming soon I promise!

  3. hodeidesign
    Member
    Posted 1 year ago #

    Thank you for this useful tool :))))

  4. Rob Myrick
    Member
    Plugin Author

    Posted 1 year ago #

    Hi hodeidesign, I updated Google Translator to show a choice of "Original Language" on the Settings page. Be sure to download the latest version, and please let me know if it works correctly for your website. I hope this helps!

  5. hodeidesign
    Member
    Posted 1 year ago #

    Thanks, it works perfectly :)))

    This is the website where I am using it:
    http://www.mapetitejuliet.com

    Bye bye :D

  6. Rob Myrick
    Member
    Plugin Author

    Posted 1 year ago #

    I'm glad it's working for you. Thanks for posting the site as well - I like seeing that. Next update will include Google Analytics functionality that ties into the translator. I've never used it yet, but I've had a request to add it - I will update you.

  7. queberican351
    Member
    Posted 1 year ago #

    Is there a way to have this plugin detect the viewers current language settings for added functionality. Almost the way Chrome automatically asks if you'd like to translate non native pages. Just thought I'd chime in with that request. Otherwise Thank you for this. My customers come from all over the world and I was looking for something like this to facilitate their navigation through my site :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags