Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Plugin how-tos · Guide

How to Add WPML Language Switcher (Step by Step)

How to Add WPML Language Switcher (Step by Step)

Short answer

Go to WPML, Languages and scroll to the language switcher options. Add a switcher to your header menu, a widget area or the footer, then pick the style and save. Block themes use WPML's switcher block, and page builders can use its widget or shortcode.

Key takeaways

  • WPML > Languages has menu, widget and footer switcher options.
  • Block themes need WPML's language switcher block in the header template part.
  • The [wpml_language_selector_widget] shortcode works in builders and shortcode blocks.
  • Use a dropdown for three or more languages and show native names.
  • Missing switchers are usually a wrong menu, untranslated pages or cache.

How do you add a WPML language switcher?

Go to WPML > Languages, scroll to the language switcher options, and add a switcher to a menu, a widget area or the footer; block themes and page builders can also use WPML's switcher block, widget or shortcode.

A language switcher lets visitors move between the translations of a page. Without one, most people never find your other languages.

WPML gives you several placement options, and you can use more than one. Many sites put a dropdown in the header menu and a flag list in the footer.

WPML's own guide to language switcher options shows every screen. This guide walks through the most common setups.

What do you need before adding the switcher?

You need WPML installed and registered, at least two active languages, and some translated content so the switcher has somewhere to link.

Checklist:

  • WPML core is active. Our guide on installing the WPML plugin covers setup.
  • Two or more languages. Add them under WPML > Languages.
  • Translated pages. At least your homepage should be translated.
  • A menu. If you want the switcher in the header, create your main menu first under Appearance > Menus.

WordPress explains menus on its Menus screen documentation.

Block themes handle menus differently, through the Navigation block. That changes where the switcher goes, as covered below.

How do you add the switcher to a menu?

In WPML > Languages, find the menu language switcher section, click to add a new switcher, pick the menu, set the position and style, and save.

Steps:

  1. Go to WPML > Languages.
  2. Scroll to Menu language switcher.
  3. Click the button to add a new language switcher to a menu.
  4. Choose the menu, usually your main header menu.
  5. Pick the position: first or last item in the menu.
  6. Choose the style: a dropdown or a list of items.
  7. Choose what to show: flags, native names, translated names, or a mix.
  8. Click Save.

Visit your site and check the header. The switcher appears as menu items, often with a sub-menu for the dropdown style.

If you have one menu per language, WPML adds the switcher to each translated version of that menu automatically.

Test the switcher on a phone as well. Dropdown switchers live inside the mobile menu, so open the menu toggle and make sure the language list expands and every link goes to the right page.

If your theme has more than one menu location, such as a top bar and a main bar, choose the one visitors see first. A top bar switcher is often hidden on small screens by the theme.

How do you add the switcher to a widget area or sidebar?

In WPML > Languages, use the widget language switcher section to add a switcher to a widget area, or add WPML's switcher widget directly under Appearance > Widgets.

Steps:

  1. Go to WPML > Languages and scroll to Widget language switcher.
  2. Click to add a new switcher to a widget area.
  3. Pick the sidebar or footer widget area.
  4. Set the display options and save.

Classic themes show these widget areas under Appearance > Widgets. Our guide on adding widgets in WordPress explains that screen.

Widget switchers are good for sidebars on blog layouts. Visitors on mobile, though, often never scroll to the sidebar, so do not rely on this alone.

Give the widget a clear title, such as Language, or leave the title empty if the flags and names already make the purpose obvious.

Turn on the footer language switcher option in WPML > Languages, choose its style and display options, and save; WPML then prints it at the bottom of every page.

This is the simplest switcher to set up. It needs no menu or widget area.

It works best as a backup option. Pair it with a header switcher so visitors see their choices early.

If your footer is built with Elementor Pro or another builder, the automatic footer switcher may land below your custom footer. In that case, place a switcher inside the builder template instead.

How do you add a switcher in a block theme or the block editor?

Use WPML's language switcher block: open the Site Editor, edit your header template part, insert the block where you want it, and save.

Block themes such as Twenty Twenty-Five build headers from blocks. Classic menu and widget options may not apply.

Steps:

  1. Go to Appearance > Editor.
  2. Open Patterns or Template Parts and edit the Header.
  3. Click the block inserter and search for language switcher.
  4. Add the block next to your Navigation block.
  5. Set its style in the block sidebar.
  6. Click Save.

The same block works inside posts and pages, if you want a switcher in the content itself.

Remember that the header template part is shared across the whole site. One change there adds the switcher to every page, so preview a few different templates before you save.

If your block theme shows the switcher on desktop but not inside the mobile overlay menu, place the block inside the Navigation block itself rather than next to it.

WordPress explains template parts in its Site Editor documentation.

How do you add the switcher with a shortcode or PHP?

Use the shortcode [wpml_language_selector_widget] in a shortcode block or builder widget, or call WPML's language selector action in a theme template for full control.

Shortcodes are handy when a page builder or theme has no native switcher option.

Common options:

  • Widget-style switcher: the shortcode [wpml_language_selector_widget].
  • Footer-style switcher: the shortcode [wpml_language_selector_footer].
  • In a template file: the PHP action wpml_add_language_selector.

WPML documents these in its guide to adding switchers with PHP and shortcodes.

The shortcode output follows the display settings you chose for the widget switcher in WPML > Languages.

If you edit theme templates, use a child theme so updates do not erase your changes. The WordPress child themes handbook explains the setup.

How do you add the switcher in Elementor?

WPML adds a language switcher widget to Elementor; drag it into your header template, set the style in the widget panel, and update the template.

Steps:

  1. Open your header template in Elementor.
  2. Search the widget panel for WPML Language Switcher.
  3. Drag it into the header.
  4. Choose dropdown or list and set flags and names.
  5. Click Update.

If the widget does not appear, update WPML and Elementor, then clear Elementor's cache.

Our guide on using WPML with Elementor covers the full setup.

Which language switcher style should you choose?

Use a dropdown for three or more languages and a simple list for two; show native language names rather than flags alone, because flags represent countries, not languages.

StyleBest forWatch out for
Dropdown in menuThree or more languagesNeeds a working sub-menu on mobile
Horizontal listTwo or three languagesTakes header space
Footer listBackup optionEasy to miss
Flags onlyVery small headersConfusing for shared languages like Spanish
Native namesMost sitesSlightly wider

Show each language in its own name, such as Deutsch rather than German. A German speaker looking for their language will recognize it faster.

The W3C's guidance on language negotiation and switchers explains why user choice matters more than automatic redirects.

What if the WPML language switcher is not showing?

Check that the switcher is saved for the right menu or area, that pages are actually translated, that you aren't hiding untranslated languages, and that caches are cleared.

Quick checks:

  • Wrong menu. The switcher was added to a menu not assigned to the header location.
  • Missing translations. WPML may hide languages that have no translation for the current page.
  • Cached pages. Purge your cache plugin and CDN.
  • Theme overrides. Some headers built in page builders ignore menu switchers.
  • Block themes. Classic menu switchers may not apply; use the block.

If links in the switcher go to the wrong page, check WPML's setting for languages without translations. You can choose to skip them or link to the homepage in that language.

If you use Polylang instead, see our separate guide on adding the Polylang switcher to the header.

Frequently asked questions

Where is the WPML language switcher setting?

Open WPML in the admin menu, then Languages, and scroll down. You will find sections for the menu switcher, the widget switcher, the footer switcher and links to post translations.

Can I show only flags in the WPML switcher?

Yes, but it is not recommended. Flags stand for countries, and many languages are spoken in several countries. Showing native language names, with or without flags, is clearer for visitors.

Why does the switcher not appear in my header?

The switcher may be attached to a menu that is not assigned to the header location, or your header is built with a page builder or block theme that ignores menu switchers. Use the block, widget or shortcode instead.

Can I add more than one language switcher?

Yes. WPML lets you add switchers to several menus and widget areas and also show one in the footer. Many sites use a header dropdown plus a footer list.

How do I hide the current language in the switcher?

Each switcher's settings include display options for the current language. Turn off the option to show the current language, save, and clear your cache to see the change.

Sources

  1. Language switcher options WPML
  2. Adding language switchers using PHP and shortcodes WPML
  3. Menus screen WordPress.org
  4. Site Editor WordPress.org
  5. Child themes WordPress Developer Resources
  6. Language negotiation W3C

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.