For the complete documentation index, see llms.txt. This page is also available as Markdown.

Dynamic content translation

Translate content added to the page after it loads.

By default, Weglot translates the HTML your server returns. Content that appears after the page has loaded — menus, pop-ups, results injected by JavaScript or AJAX — needs dynamic translation.

Enable it

In the plugin settings, turn on Enable dynamic content, then tell Weglot which parts of the page to watch:

  • Whitelist selectors — CSS selectors for the DOM regions to translate dynamically (for example .cart-drawer or #search-results).

  • Allowed URLs — restrict dynamic translation to specific URLs. Leave empty (or use all) to run it everywhere.

Add selectors from your own code

You can also register selectors programmatically from your own plugin or module, using the plugin's Craft events. See Extending Weglot with events.