WordPress - How to change the position of the language switcher

In this article, you’ll learn the different ways you can change the position of the Weglot Language Switcher on your WordPress website.


Navigating in your Weglot settings on your WordPress admin, you will see different ways to move your switcher, as you can see below:

 

 

Add the language switcher to a menu

 

You have the possibility to integrate the switcher directly into a menu through your WordPress admin:

  • The button "Go to menu" brings you to WordPress Dashboard > Appearance > Menus
  • Select the menu where you’d like to place the switcher
  • In the left panel, select “Weglot Switcher”, check the box, and add it to your menu
  • Drag and drop the switcher to adjust its order in the menu
  • Click “Save Changes” and refresh your website

The Weglot switcher is now on your menu.

 

⚠️ Note that your website must be live and accessible to be able to use the Switcher Editor

 

Add the language switcher to a widget

You have the possibility to integrate the switcher directly into a widget through your WordPress admin:

  • Go to your WordPress Dashboard > Appearance > Widgets
  • Select the widget area where you want the switcher to appear (widget areas depend on your theme)
  • Click the + icon to open the search bar
  • Type “Weglot” and select “Weglot Widget”
  • Refresh your website

You'll see that the Weglot switcher is now in the selected widget area.


 

The Weglot_here option

 

You can add the code below wherever you want in the source code of your HTML page. The button will appear at this location:

<div id="weglot_here"></div>
 

This code will automatically be copied to your clipboard once this option (in your Weglot plugin) is clicked:

 

 

The [weglot_switcher] shortcode

 

To position the switcher, you can use the shortcode [weglot_switcher] and the switcher will automatically be placed where you positioned it.

The shortcode will automatically be copied to your clipboard after clicking this option in your Weglot plugin on WordPress.


 

The way you add the shortcode to your website depends on the builder you use.

  • Most website builders have a shortcode widget you can use to add this easily.
  • If you’re comfortable with PHP, you can also add the shortcode directly in your code (see this article for guidance).

 

Usually, builders have integrated shortcode widgets to easily add shortcodes to your website.

If you are familiar with PHP coding, you can also directly add shortcodes to your website, based on this, for example.

 

With these methods, you can place the Weglot Language Switcher exactly where it makes the most sense for your site.

Give feedback about this article

Was this article helpful?