Translate content inside shortcodes
POM Translate can extract shortcode inner text and attribute values while retaining the shortcode itself as protected structure. The translation table labels these rows Shortcode inner content or Shortcode attribute.
Only extracted rows are intended for translation. Do not rewrite the complete shortcode syntax.
Save the canonical shortcode first
The shortcode must be present in the published or private source object. Save the post after its tag, attributes, and nesting are final so POM Translate can assign stable structural keys.
Then open Translations → Translate contents and filter to that post.
Translate inner content
For a shortcode such as:
[notice]Delivery takes two business days.[/notice]
translate the extracted human-readable inner row. The opening and closing shortcode remain in the body skeleton and should not be pasted into the translation textarea unless the extracted source itself displays protected shortcode markers.
Verify nested formatting on the public route because inner content can also contain protected inline HTML.
Translate attributes selectively
Attributes may be editorial text or technical configuration. POM Translate maintains a specific allowlist for known POM contact-form shortcodes so labels, placeholders, descriptions, messages, button text, privacy copy, and other visitor-facing values can be extracted without exposing structural attributes.
For shortcode tags without a registered map, attributes are eligible by default and integrations can refine that decision. Therefore:
- read the Context carefully;
- translate only values that visitors should read;
- leave IDs, email addresses, field names, numeric controls, URLs, CSS classes, and option keys unchanged;
- ask the shortcode provider to register an explicit attribute map if technical values appear.
An empty map for a known shortcode means none of its attributes are translated.
Keep stable tokens intact
Shortcode processing replaces extracted pieces with stable markers in the stored skeleton. If a translation row contains tokens:
- preserve each token;
- do not translate the marker characters;
- do not duplicate a token to repeat content;
- do not move a token into another row.
Invalid protected-placeholder edits can be rejected at save time. Even a syntactically accepted translation must be tested through the actual shortcode renderer.
Respond to shortcode edits
Changing a tag, attribute list, nested order, or source text can change the extracted row identity. When a source row changes, its former target translations are removed unless an exact matching source translation is available for reuse.
After restructuring a shortcode:
- save the source object;
- reload its locale summary;
- filter to Pending;
- translate new rows;
- confirm obsolete rows are no longer shown;
- retest the rendered component.
Verify functional content
Check:
- visible labels and messages;
- form submission and validation;
- option values versus option labels;
- customer and administrator email text;
- privacy links and consent wording;
- hidden fields and technical identifiers;
- responsive layout;
- behavior with an intentionally empty target row.
If the shortcode begins with [vc_, also read Translate builder content because the Visual Composer parser follows its own extraction path.