WordPress.org

Ready to get started?Download WordPress

Forums

Google Language Translator
[resolved] Search results do not Google translate (4 posts)

  1. Michael
    Member
    Posted 3 months ago #

    Hi forum, I recently installed a simple yet perfect plugin called
    Google Language Translator - works perfectly, translates most pages and posts

    Love this plugin!
    Here is the issue: my website search results do not get translated,
    * I just noted a few other main pages don't get translated either.

    my question is, why not?

    Any help would be greatly appreciated, thank you.

    Here is website: PoetSayings.com

    Is there a meta tag I can add or something?

    Thanks again!

    https://wordpress.org/plugins/google-language-translator/

  2. Michael
    Member
    Posted 3 months ago #

    I resolved this,

    the solution, just add this bit of code to the header or footer template!
    and all pages will translate
    <div style="display:none;"><?php echo do_shortcode('[google-translator]'); ?></div>

  3. Michael
    Member
    Posted 3 months ago #

    And I just figured out second way to do this as well, one where you can show just the flags or show the drown down box and flags, if anyone needs any pointers with this, just let me know!

  4. Rob Myrick
    Member
    Plugin Author

    Posted 4 weeks ago #

    Hi Michael,

    Thanks for your post here. I'm sorry that I could not reply sooner.

    Your solution is a great fix for your situation.

    The reason this did not work originally is because your search results are setup on a separate page template from your main poems. So you actually removed the translator from the website when a user views search results.

    By adding to the header/footer and hiding the translator, you made it available again, so that is why it works.

    Another solution would have been to add the translation directly into the header from the beginning, then it would have been available on all pages, without ever having the need to hide it. The only benefit of doing it this way is that users could change the language on search results pages too.

    Just and idea of course - yours ideas seems to work great.

    Thanks! Rob

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.