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:
- identify the shortcode instance
- render it in a scan context
- inspect the returned HTML
- extract human-visible text and common attributes
- store the output as stable translation segments
- queue missing translations
Common extracted attributes include:
alttitleplaceholderaria-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.