Site logo

Archived topic

How to add Language Switcher in the site header

11 replies · Started by Hana on June 12, 2022

Viewing posts 1–12 of 12

Hello, How to add Language Switcher in the site header?

Hi there,

you would need to use a Translation plugin like Polylang or WPML or Locotranslate.

I'm using WPML
How to move the switcher position " mentioned in this screenshot"

[url=https://postimg.cc/8jH9bd2X][img]https://i.postimg.cc/RZ5m4XXm/switcher.jpg[/img][/url]

Can you link us to your site?

How did you add the switcher right now?

I added it by WPML plugin

Hi Hana,

WPML has a shortcode for the language switcher. Researching, I found that this seems to be the shortcode: [wpml_language_switcher]

Reference: https://wpml.org/documentation/support/wpml-coding-api/shortcodes/#wpml_language_switcher

We can use this shortcode, and add it to through Hook Element hooked to your preferred location.

Hook Element: https://docs.generatepress.com/article/hooks-element-overview/

To have an idea of the appropriate hook to use, may you share the link to the site in question?

You may use the private information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

Hope to hear from you soon. :)

I sent my site private URL

Thank you for sharing the link to your site.

You may try generate_after_header_content hook.

Example: https://share.getcloudapp.com/nOuX8G9E

Then, display it to your preferred location.

Hope this helps!

Hello, I did it, it is work but display not quite right
please check screenshot

[url=https://postimg.cc/18S4grS4][img]https://i.postimg.cc/Gm8D5XSP/switcherrr.jpg[/img][/url]

Hi there,

how was the Search bar added to the site ?

Hello, I already moved the switcher and login/register, but how to move the cart icon?

[url=https://postimg.cc/DS1Zh2C9][img]https://i.postimg.cc/CxQfj5bx/moving-cart.jpg[/img][/url][url=https://postimages.org/]img host[/url]

I can't see your site it's under construction mode.

Can you provide login detail so we can see your site?

This archived topic is closed to new replies.