WPML

What WPML’s Language Switcher Can Do

Out of the box, WPML produces a switcher that:

  • Shows every active language on your site, in the order you choose.
  • Labels each language in its native name (Deutsch, Français) or in the current site language (German, French) – your choice.
  • Optionally shows flags (a sprite that scales with your theme).
  • Handles missing translations gracefully: either skip the language, or link to that language’s home page.
  • Can be placed in any WordPress menu, in any widget area, in the footer, or inline above and below posts.
  • Comes in a Gutenberg block for any page-builder layout.
  • Can be hidden on specific pages where it would be in the way (404, checkout, account).
  • Caches its rendered HTML for fast page loads.

Most sites use the built-in placements and the defaults. Theme developers who need more control can build a custom switcher in code using WPML’s API.

Where the Settings Live

Open WPML > Settings > Language Switchers. The page is grouped by question, not by UI tab. Pick the section that matches what you want to change.

What Languages Appear and in What Order

The Language switcher options card has a drag-and-drop area listing every active language. The order here determines the order in every switcher on the site. Drag languages up or down and save.

In the same card, choose:

  • Native vs. current-language label. Show Deutsch (native) or German (current-language). Native is more inviting to speakers of that language; current-language is clearer for first-time visitors.
  • Flags on or off, and the flag format.

What Happens When a Translation Is Missing

Not every page is translated into every language. The How to handle languages without translation option decides what the switcher does for a language that has no translation of the current page:

  • Skip language (default). The language disappears from the switcher for this page. The cleanest UX; visitors only see languages they can actually read.
  • Link to home of language for missing translations. The switcher entry shows the language’s home page instead. Useful when you want every language always reachable from every page, but visitors may land on content they weren’t expecting.

The choice has UX implications worth thinking through deliberately.

Where the Switcher Appears

Five placements, each toggled independently on the same Settings page:

  • Menu language switcher. Drop the switcher into any WordPress menu (header, footer, sidebar, wherever your theme assigns menus). Add multiple if you want different placements per menu. Each menu switcher gets its own preview row showing where it sits.
  • Widget language switcher. Add the switcher to any widget area your theme registers: sidebars, header zones, footer columns.
  • Footer language switcher. A single global toggle that auto-renders the switcher at the bottom of every page.
  • Inline links to translations of posts. A single checkbox that shows “this post is available in X” links above or below each post.
  • Custom switchers. When the built-in placements aren’t enough, theme developers can call WPML’s switcher API from any template file. The Settings page exposes a Customize button for the rendering options.

Hide the Switcher on Specific Pages

Some pages don’t need a switcher: your 404 page, account screens, checkout. WPML’s conditional display rules let you hide the switcher per-page without resorting to display:none CSS in your theme.

You set per-page rules on the same Settings > Language Switchers page. Pick the pages you want the switcher hidden on; the rule applies to every switcher placement at once.

Preserve URL Parameters

When a visitor clicks the switcher, WPML rebuilds the URL for the target language. By default, query-string parameters (?utm_source=newsletter, filter parameters, etc.) are dropped. This breaks analytics campaigns and filtered listings.

The Preserve URL arguments field lists query keys you want preserved across the switch. Anything you put here (one per line) travels with the visitor to the translated URL.

Custom CSS for the Switcher

A single text area under Additional CSS applies styling to every switcher on the site at once. Useful for matching the switcher to your theme without touching theme files.

Caching the Switcher Template

The Performance card has a single checkbox: Cache language switcher templates. With it on, WPML caches the rendered HTML of every switcher placement, which speeds up page loads on a busy site.

The gotcha: when you change a switcher option and don’t see your change reflected on the front-end, the cache is the first place to check. Turn it off, reload, and your changes appear. Then turn caching back on for production.

Custom Switchers in Theme Code

For sites where the built-in placements don’t fit (a switcher in a specific position inside the page header, a custom dropdown rendered by your theme, anything outside a WordPress menu or widget area), WPML exposes an API that lets theme developers build a custom switcher.

The Custom language switchers card has an Enable toggle and a Customize button. Once enabled, theme template code can render the switcher anywhere using WPML’s documented PHP API.

Written by Amir · Last updated June 26, 2026