WordPress.org

Ready to get started?Download WordPress

Forums

Google Language Translator
[resolved] Add Translator to Sidebar, Menu or Header (11 posts)

  1. sawgrass
    Member
    Posted 1 year ago #

    Hi. Is there any way to use google translator in the sidebar, some place on the header or as a menu item? (Not toolbar) Thanks much

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

  2. Rob Myrick
    Member
    Plugin Author

    Posted 1 year ago #

    Hi sawgrass,

    I just tested the shortcode in the sidebar and that seems to be working - the plugin does support adding shortcode to your sidebar. So after installing the plugin and activating, place [google-translator] directly into the sidebar and it should work.

    Adding the translator into your header file is slightly different, due to the way WordPress handles shortcodes outside of pages, posts, and sidebars. You will need to open 'header.php' and then insert <?php echo do_shortcode ('[google-translator]'); ?> in the area where you want to add it.

    That should do it! Please let me know if you have any issues and I will help out.

    Rob

  3. Rob Myrick
    Member
    Plugin Author

    Posted 1 year ago #

    sawgrass, I also will need to look into exactly how you could place the shortcode into a WordPress menu - this seems a little tricky, but I'm sure there's some way to do it. If anyone out there has suggestions on how this could be done, it would be appreciated.

  4. sawgrass
    Member
    Posted 1 year ago #

    Hi Rob. Thanks for your quick response. The plugin does work in the sidebar (don't know what I doing before, lol) and now in the header, but not simultaneously. Whenever the code you provided is placed in 'header.php' the language bar in the sidebar automatically goes away. Is there a way to have it in both locations at the same time? Thanks again

  5. Rob Myrick
    Member
    Plugin Author

    Posted 1 year ago #

    Hi sawgrass, I believe (although not 100% sure) that Google does not allow more than one translator tool on your website simultaneously. I have tried this on my own sites in different locations and it has never worked out. I would love for someone to prove me wrong on this though, and I would change it to work correctly if so.

    Sorry that I couldn't help you on that one!

  6. Rob Myrick
    Member
    Plugin Author

    Posted 1 year ago #

    sawgrass, I meant to say in my previous post that having two translator tools on one page doesn't seem to work, although you can have as many as you want throughout the entire website.

  7. pakoman
    Member
    Posted 1 year ago #

    Hello, is there a way to remove some languages from the dropdown menu

  8. Rob Myrick
    Member
    Plugin Author

    Posted 1 year ago #

    Hi pakoman, there is no way through the plugin to restrict specific languages, although the core Google Translator tool DOES, in fact, allow it. Check out this link here: http://translate.google.com/manager/website/.

    You will need to have a Google account to get started.

    Once you begin setting up the tool, you will see an option for choosing specific languages that display in the drop-down. You could setup the Google tool here and use their code instead of the plugin if you are comfortable with going this route and adding the code directly into the site.

    I hope that helps you! Please let me know if I can help out with the process…

  9. Rob Myrick
    Member
    Plugin Author

    Posted 1 year ago #

    pakoman, I'm thinking that we will add this functionality in the next update or so - stay tuned man!

  10. pakoman
    Member
    Posted 1 year ago #

    Awesome, Thanks

  11. Rob Myrick
    Member
    Plugin Author

    Posted 1 year ago #

    I'm closing this as resolved. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic