Site logo

Archived topic

Google translator and Hook

3 replies · Started by Sergei on December 24, 2018

Viewing posts 1–4 of 4

Hey! I wish to put google translater script in my webpage navigation or above navigation with hook. When i add scipt in generate_navigation hook, then google translate dropdown box dublicate and looks weird. Any solution for that? Here is example where i want to put that google translator code. And one more issue when using that hooks and google scripts, in mobile menu disappears home button.

Thank you!

Hi there,

you can use this CSS to align the translate widget to the right:

#google_translate_element {
    text-align: right;
}

I am not sure why it is outputting two of them. can you test to see if it is an issue when hooking it, by adding as a Widget?

#google_translate_element {
    text-align: right;
}

Work very well for me. Maybe its bug with generate_navigation, because when i add that CSS code then i get 3 dublicate boxes. Now i use before_header_content hook and works great.

Merry Christmas and Happy New Year!
Thank you!

You're welcome. How odd is that :) Glad you found a solution.

Merry Christmas and Happy New Year!

This archived topic is closed to new replies.