Support Log in

Adding a Language Switcher to Your Site

User Guide
Prefer video? Watch the Lang Forge tutorials 9 short guides covering every feature Watch

The language switcher is how visitors choose which language to view your site in. Without a visible, accessible switcher, visitors would need to manually type translated URLs — which nobody does. A well-placed language switcher is the bridge between your original content and all your translations. Lang Forge provides four different ways to add a switcher, so you can choose the method that fits your site’s design and layout best.

The best approach depends on your theme’s structure, your design preferences, and where your visitors expect to find language options. Many sites use more than one method — for example, a dropdown in the header navigation plus a list in the footer.

Step-by-step: Option 1 — Adding a switcher as a Widget

Best for themes that use widget areas in the sidebar, header, or footer.

  1. Go to Appearance > Widgets in your WordPress admin
  2. Locate the Lang Forge Language Switcher widget in the list of available widgets
  3. Drag it into the widget area where you want it to appear — for example, “Header Widget Area”, “Sidebar”, or “Footer Column 1”
  4. Configure the widget settings:
SettingWhat it controlsRecommended for
StyleDropdown (compact, one click to expand), List (vertical links, always visible), or Flags Only (just flag icons, most compact)Dropdown for headers, List for sidebars, Flags Only for tight spaces
Show flagsDisplays flag icons next to language namesYes for most sites — flags are visually recognizable
Show language namesDisplays the language name in its native script (e.g., “Espanol”, “Francais”)Yes for sidebars and footers, optional for headers
Show current languageHighlights which language is currently activeYes — helps visitors confirm their current language
Hide currentHides the active language from the listOptional — saves space when combined with a clear active-language indicator
  1. Click Save
  2. Visit your site and verify the switcher appears in the correct location and works as expected

Step-by-step: Option 2 — Adding a switcher with a Shortcode

Best for placing the switcher inside page content, custom templates, or theme areas where widget drag-and-drop is not available.

  1. Decide where you want the language switcher to appear — inside a page, a text widget, or a theme template file
  2. Add the following shortcode at that location:
  1. Customize the attributes to match your preference. Available attributes and values:
AttributeValuesDefault
styledropdown, list, flagsdropdown
show_flagsyes, noYes
show_namesyes, noYes
show_currentyes, noYes
hide_currentyes, noNo
  1. Save the page or widget
  2. Preview the page to confirm the switcher displays correctly

Step-by-step: Option 3 — Adding a switcher as a Menu Item

Best for sites where the language switcher should appear inside the main navigation bar.

  1. Go to Appearance > Menus in your WordPress admin
  2. Select the menu you want to add the switcher to (for example, your primary navigation menu)
  3. On the left side of the page, look for the Lang Forge panel (below Pages and Categories)
  4. Check the Language Switcher checkbox
  5. Click Add to Menu
  6. A special menu item labeled “Language Switcher” appears in the menu structure
  7. Drag it to the desired position — most sites place it at the very end of the menu (far right)
  8. Save the menu
  9. The menu item automatically renders as a language dropdown on the frontend — it is not just a text link, it becomes a functional switcher

Option 4: Admin bar switcher (automatic)

A language switcher automatically appears in the WordPress admin bar whenever you are logged in and viewing the frontend of your site. This is useful for content managers who need to quickly preview different language versions while reviewing content. No setup is required — it is always there for logged-in users.

What visitors see and how it behaves

The language switcher only displays languages that have a published translation for the current page. If your site has five active languages but only three have a published translation for the page the visitor is viewing, only those three appear. This prevents visitors from clicking a language and landing on a missing or placeholder page.

When a visitor selects a language, the switcher takes them to the translated version of the exact page they are on. It also sets a cookie to remember their preference. On subsequent visits, the site automatically serves content in their chosen language (if a translation exists for the page they are visiting).

Real-world example: A multilingual corporate site

A global consulting firm places a dropdown language switcher in the header using the Menu Item method (so it appears in the main navigation) and a list-style switcher in the footer using a Widget. The header dropdown provides quick access on every page, while the footer list shows all language options with both flags and native language names. Visitors arriving from a Google search in German see the header dropdown and can confirm they are reading the German version, or switch to English or French if they prefer.

Common mistakes to avoid

  • Placing the switcher where visitors cannot find it. The most expected locations are the top-right corner of the header or in the footer. Hiding it deep in a sidebar reduces its effectiveness
  • Using flags alone for a single-country site. If your site serves Canada (English and French), using only flag icons can confuse visitors because both languages share the Canadian flag. Use language names instead

> Tip: Test the language switcher on mobile devices. Dropdown switchers typically work better in mobile navigation than list-style switchers, which can take up too much vertical space on small screens.

> Good to know: The language switcher preserves the visitor’s choice using a browser cookie. If someone selects Spanish during one visit, they will continue seeing Spanish on subsequent visits, even when navigating to different pages.

[Screenshot: A language switcher dropdown in a site header showing flags and native language names for English, Spanish, French, and Japanese]

Forge AI Assistant Online

Hi! I'm the Lang Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs