Skip to content

How to Add Elementor Language Switcher with Translatepress in Header?

Table Of Content

If you translate your site with TranslatePress, visitors need a way to change language from any page. The header is the obvious place for it.

The Header Meta Content widget in The Plus Addons for Elementor adds TranslatePress’s own switcher as one item in its header row, so it sits in line with your search icon, cart or buttons instead of floating on its own.

To check the complete feature overview documentation of The Plus Addons for Elementor Header Meta Content widget, click here.

Requirement – This part of the widget needs the PRO version of The Plus Addons for Elementor, installed and activated.

Table Of Contents

Before You Start

  • Edition: Pro — the Language Switcher item needs the Pro version. In the free plugin the Select Options dropdown labels it (Pro), and turning its Display switch on renders nothing.
  • Widget to enable: Header Meta Content, switched on under The Plus Addons > Widgets.
  • TranslatePress installed, activated and configured with at least one extra language. The switcher shows whatever TranslatePress is set up to publish.
  • Where to add it: your header template, so the row shows on every page. The widget’s own Use with Theme Builder section links to a Create Header Template button.
  • Two steps, always: adding an item in Meta Content is only half of it. Nothing appears until you also turn on that item’s own Display switch in its section further down the Content tab.

Set Up the Languages in TranslatePress First

Add your translation languages in Settings > TranslatePress before you add the switcher to the header.

Translatepress settings screen showing the languages configured for the site

Add the Language Switcher Item

  1. Add the Header Meta Content widget to your header template.
  2. In Meta Content, open the item and set Select Options to Language Switcher.
Select options set to language switcher in the header meta content widget's meta content repeater
  1. Turn on Display Language Switcher in the Language Switcher section and set Select to Translatepress.
Select set to translatepress in the language switcher section
  1. If you want a label, fill in Before Text or After Text.
Before text field in the language switcher section

What Applies on the TranslatePress Path

SettingApplies?Notes
Display Language SwitcherYesNothing renders without it
SelectYesSet it to Translatepress
Before TextYesPrinted immediately before the switcher
After TextYesPrinted immediately after the switcher
Style, Layout, Skip LanguageNoWPML only — they disappear from the panel once you choose Translatepress
Country Flag, Native Name, Translated Name, Language CodeNoWPML only. On this path the flags and names come from TranslatePress’s own settings

How It Behaves

The widget hands the switcher to TranslatePress and wraps it in the header row. What you see is TranslatePress’s own switcher, with the languages, flags and names configured in its settings.

Translatepress language switcher open in a site header, listing english, french and german
Animated demo of the header language switcher
  • Selecting a language loads that language’s version of the page.
  • The switcher lists only the languages TranslatePress publishes. Adding a language there adds it here, with no change to the widget.
  • Before Text and After Text are printed once, around the whole switcher.
  • The Translatepress Language Switcher section on the Style tab styles the wrapper this widget puts around it.

Limitations

  • Only Before Text and After Text affect this path. The flag, native-name, translated-name, language-code, style and layout options belong to the WPML path and are hidden once you choose Translatepress.
  • The switcher’s own layout — dropdown or list, flags on or off, how it opens — is set in TranslatePress, not here.
  • One language plugin per item. WPML and TranslatePress cannot both drive the same switcher.
  • The widget does not translate anything. It only shows TranslatePress’s switcher.
  • The whole item needs Pro. In the free plugin the dropdown shows Language Switcher (Pro) and nothing is drawn.

Troubleshooting

The switcher does not appear

Check that a Meta Content item is set to Language Switcher, that Display Language Switcher is on, that Select is Translatepress, and that TranslatePress has at least one extra language published.

The flag and name options are missing from the panel

They are WPML-only and are hidden while Select is Translatepress. Change what the switcher shows in the TranslatePress settings instead.

Two language switchers appear on the page

TranslatePress also has its own floating switcher, which is on by default. Turn it off in Settings > TranslatePress if you only want the one in the header.

The switcher is squashed or sits oddly in the row

It is a full TranslatePress dropdown, not a single icon. Give the item more room with Icon Left Space and Icon Right Space on the repeater item, or with Icon Padding in Extra Options.

Related Docs

Related Frequently Asked Questions

Related Docs