Add a selector with a shortcode
The shortcode places a selector in any public area that executes WordPress shortcodes.
Start with:
[pom_translate_language_switcher]
It uses the saved Shortcodes format and Shortcodes markup settings.
Configure the saved defaults
- Open Settings → POM Translate → Language switcher.
- Under Shortcodes, choose List, Links, or Dropdown.
- Set Shortcodes markup.
- Save the settings.
- Insert the shortcode into a shortcode block, widget, builder module, or other supported area.
Override one instance
Use attributes when one placement needs different output:
[pom_translate_language_switcher format="dropdown" markup="{%local_label%}" container_class="header-languages" button_class="header-languages__button"]
You can also control whether the base and current languages appear:
[pom_translate_language_switcher include_base_language="false" include_current_language="true"]
An empty include_current_language value follows the global Hide current language setting. An explicit valid Boolean overrides it for that shortcode only.
Verify the embedding surface
- Confirm the shortcode is rendered rather than printed as text.
- Check its placement before and after content filters run.
- Test every offered destination.
- For dropdown format, operate the toggle by mouse and keyboard.
- Check that custom CSS classes coexist with POM Translate's required base classes.
- Test a page where one locale is excluded.
The shortcode returns an empty string when filtering leaves no language entry to render.
See Shortcode reference for the complete attribute contract.