Back

Different snippets for each language.
One panel in WordPress.

Language Code Injector is the PLUS module in WP Quick Tools that inserts an HTML or JavaScript snippet in the footer based on the site’s current language. You can manage separate code for Italian, German, English, and any other languages you choose to configure.

It is useful when a service provides separate language versions of its widget or an integration needs different code for each language. Snippets are inserted directly: use only trusted code and always check the result and any consent requirements.

What you can do with Language Code Injector

Organize snippets by language

Define a comma-separated list of language codes. Each language has its own code field and Enable checkbox.

Choose how to detect the language

AUTO tries the available integrations and falls back to the WordPress locale. You can also choose a specific source. TranslatePress and MultilingualPress use the locale as their reference.

Insert code in the footer

The module outputs only the enabled snippet for the detected language through wp_footer. It does not translate the code or change the site language.

Keep your configurations

Snippets for languages removed from the list remain saved. To stop them from running, explicitly disable them before removing the language from the list.

Getting started, step by step

1. Choose the language source

Open the module and select AUTO or the source appropriate for the site. Check the detected language on public pages.

2. Define the languages

Enter comma-separated codes, such as it,de,en. Save and reopen the panel if necessary to fill in the new fields.

3. Add the snippets

Paste the correct HTML/JS code into each field. Do not enter PHP, passwords, or private credentials.

4. Enable only what you need

Select Enable for the snippets that should run and save the configuration.

5. Check every language

Open the frontend language versions and check that only the intended snippet is inserted. Also check language variants and caching.

6. Manage pauses

To stop a snippet, clear Enable and save. Simply removing the language code from the list does not guarantee that the saved snippet will stop running.

Frequently asked questions

What types of code can I insert?

HTML and JavaScript, including script tags. The code is output directly in the footer and is not a suitable place for PHP or secrets.

No. It selects the snippet for the current language. Page and content translations are managed with the site’s multilingual tools.

It tries WPML, Polylang, and Weglot, then moves to paths based on the WordPress locale. Check the language actually resolved on your site.

In this version, their detection paths use the WordPress locale. Selecting the source does not amount to a full dedicated integration.

Yes. AUTO, WPML, Polylang, TranslatePress, Weglot, MultilingualPress, and WordPress Locale are available. If the source does not return a language, the locale is used.

No. Regional codes are normalized to the base language: en-US and en-GB both become en.

On the frontend through wp_footer, at priority 100. The theme or template must call this WordPress hook.

No. Insertion is automatic when the module is active and the snippet for the detected language is enabled and not empty.

If there is no enabled, nonempty snippet for the detected language, the module outputs no code.

No. Saved code is retained. Before removing a language from the list, disable its snippet and save if you want to prevent it from running.

Access to WQT management and the unfiltered_html capability are required. Snippets can execute code in visitors’ browsers.

No. If a snippet uses external services, cookies, or tracking, you must coordinate it with the consent system and verify its actual behavior.

Check other active plugins and snippets, the language source, and cached versions. The module does not automatically check for duplicates.