Skip to content

Language Switcher

The language switcher is a UI element that lets visitors choose their preferred language. When a visitor clicks a language, they are taken to the translated version of the page they are currently viewing — the URL updates to the language prefix (e.g., /de/about/) and all text on that page is shown in the selected language.

Omnalingo provides several ways to add a switcher to your site, and you can use more than one at a time.


The easiest option. Enable the floating switcher in Settings → Language Switcher and it appears as a fixed widget in the corner of every page on your site. Visitors can expand it to see the available languages and switch instantly.

No theme changes or shortcodes required — the widget is injected automatically via WordPress’s footer hook.

You can configure its position (bottom-left or bottom-right) and what it displays (flags, language names, or both) from the same settings screen.


To place the switcher in a specific location — inside a page template, a text widget, or a custom block — use the shortcode:

[omnalingo-switcher]

The shortcode renders the switcher inline wherever you place it. It works in:

  • The WordPress block editor (add a Shortcode block)
  • Classic text widgets
  • Any theme template file that runs do_shortcode()
  • Most page builder text elements

You can add the language switcher directly to a WordPress navigation menu:

  1. Go to Appearance → Menus (or Appearance → Editor → Navigation in block themes).
  2. Add a Custom Link menu item with the URL #omnalingo_switcher and any label you like.
  3. Save the menu.

Omnalingo detects this placeholder URL and replaces the menu item with the rendered switcher widget when the page loads.

Alternatively, add individual language links to your menu using the URL placeholder #omnalingo_lang_{slug} (for example, #omnalingo_lang_de for German). Each placeholder is replaced with a direct link to the current page in that language.


If your theme has widget areas (Classic themes):

  1. Go to Appearance → Widgets.
  2. Find the Omnalingo Language Switcher widget in the available widgets list.
  3. Drag it into the sidebar or footer widget area of your choice.
  4. Save.

The widget renders the switcher in that widget area on every page.


All switcher methods share the same display settings, configurable under Settings → Language Switcher:

OptionWhat it shows
Flags onlyCountry flag icons
Language names onlyFull language name (e.g., “Deutsch”)
Flags and namesBoth side by side
AbbreviationsShort language code (e.g., “DE”)

The current active language is highlighted in the switcher so visitors can see which language they are already viewing.


The switcher uses your theme’s existing styles for fonts, colors, and spacing where possible. For custom styling, target the .omnalingo-switcher CSS class. For example:

.omnalingo-switcher {
font-size: 14px;
}
.omnalingo-switcher a {
color: #333;
}

Add custom CSS to Appearance → Customize → Additional CSS or your theme’s stylesheet.


SituationRecommended method
You want the simplest setupFloating widget
You want the switcher in your headerNavigation menu item
You want it in a specific page sectionShortcode
You want it in a sidebar or footer areaWidget

You can combine methods — for example, use the navigation menu method in the header and the floating widget as a fallback for mobile visitors who scroll past the header.