Configure selector markup

Each selector surface has its own markup setting:

  • Nav menus markup;
  • Shortcodes markup;
  • Floating language switcher markup.

The template is applied once per locale entry.

Write a template

Merge tags use this exact form:

{%local_label%}

Allowed WordPress post HTML can surround the tags:

<strong>{%local_label%}</strong> <small>{%code%}</small>

POM Translate sanitizes the template with the allowed post-HTML policy before replacement. Text values are escaped, while the supported flag tags supply their own prepared markup.

Know the fallback order

For a shortcode:

  1. use its non-empty markup attribute;
  2. otherwise use Shortcodes markup;
  3. otherwise use the built-in product template.

Navigation and floating selectors use their corresponding saved setting, followed by the product template. Unknown tags are replaced with empty text. If no visible label remains, the locale code is shown in <strong>.

Avoid structural conflicts

The template controls the contents of a language link, not the surrounding selector:

  • do not add a second <a>;
  • do not create list items;
  • do not add dropdown containers;
  • do not paste scripts or event handlers.

POM Translate owns those outer elements, classes, URLs, and language attributes.

Verify after saving

Inspect the public HTML and confirm that no unsupported tag was stripped in a way that changes meaning. Test missing flags and country labels, then check the accessible name produced after HTML is removed.

Chapter 10 documents each supported merge tag individually.