Instant Language SwitcherDocumentation
⌕
v0.20.0

Shortcodes & Plugin-Generated Pages

Translate content generated by registered plugin shortcodes.

Many WordPress plugins use a page as a shell containing only a shortcode:

[staff_directory]
[event_manager]
[course_listing]
[research_outputs]

A normal source scanner sees only the shortcode token. Instant Language Switcher adds a rendered-shortcode scanner to solve this.

Server-rendered shortcodes

When a registered shortcode returns HTML during PHP rendering, the scanner can:

  1. identify the shortcode instance
  2. render it in a scan context
  3. inspect the returned HTML
  4. extract human-visible text and common attributes
  5. store the output as stable translation segments
  6. queue missing translations

Common extracted attributes include:

  • alt
  • title
  • placeholder
  • aria-label
  • button/input values

Elementor shortcode widgets

Shortcodes stored inside Elementor or third-party builder metadata are also inspected where possible.

Runtime application

Stored shortcode translations are applied after WordPress renders the shortcode output, so the third-party plugin does not simply regenerate the English HTML after translation.

JavaScript/AJAX-only shortcodes

A shortcode may return only an empty container and then load its real data through JavaScript/AJAX. PHP cannot see that final browser content during the shortcode scan.

For these cases:

  • the full-site rendered crawler may capture server-visible output
  • Visual Editor DOM discovery can capture browser-rendered text

Developer exclusion filter

A site-specific integration can stop a shortcode from being executed by the scanner using the ist_scan_shortcode filter. This is useful for shortcodes that perform actions or should never run in a scan context.