Skip Navigation

Home » WPML Documentation » Developers Information » Multilingual Tools Plugin

Multilingual Tools

Test your configuration setup and confirm your plugin and theme are compatible with WPML.

Multilingual Tools is a free addon for testing your plugin and theme compatibility with WPML. 

By using this addon, you can identify which texts and elements are properly configured for translation (and which aren’t) as well as generate a language configuration file.

Getting Started

To get started, install and activate: 

Remember that Multilingual Tools is a testing plugin, so never use it on production or client sites. 

How to Use Multilingual Tools

To begin, start by going to Multilingual Tools Overview to view a summary of your current language configuration file.

Multilingual Tools Overview page

If you’re satisfied with your configuration setup, follow the steps below to test it. Otherwise, generate a new language configuration file to update your settings.

1. Verify Hard-Coded Texts are Wrapped in Gettext Calls

In order to translate your plugin or theme, you need to wrap all hard-coded texts with gettext calls. If you haven’t done this yet, or want to double-check your setup, follow the WordPress i18n guidelines for instructions.

2. Scan Your Plugin or Theme for Hard-Coded Texts

Next, use WPML to scan your plugin or theme for hard-coded texts:

  1. Go to WPML Theme and plugins localization.
  2. Select your theme or plugin and scan for texts.
Scanning texts in theme

3. Choose Elements to Test

Next, select the elements for which you want to test the configuration setup:

  1. Go to Multilingual Tools Settings.
  2. Scroll down to Add language information to post duplicate.
  3. Check the elements you want to test and save.
Choosing elements to test

To test strings, open the strings dropdown in the Auto generate strings translations section, select your string sources and click Generate strings translations.

4. Send Content for Translation

To avoid spending time (or money) translating dummy content, Multilingual Tools appends a language prefix to texts. To execute this action, duplicate your content using WPML and let Multilingual Tools handle the rest:

  1. Go to WPML Translation Management.
  2. Select the content you want to test.
  3. Choose Duplicate as the translation method and translate. 

5. Confirm Compatibility

Finally, visit the content you just translated on the front-end and switch languages. Your elements are compatible if texts include a language prefix. If some texts don’t contain a prefix, they’re not compatible and need additional configuration.

Checking compatibility on front end

To learn more about achieving compatibility, follow our plugin and theme internationalization guide with step-by-step Git commit examples.

Generate a Language Configuration File

To generate a language configuration file, go to Multilingual Tools Configuration File and set your preferences.

Settings Overview

Custom Post Type / Custom Taxonomies

  • Do nothing – ignore and don’t translate
  • Translatable – only show translated items
  • Translatable – use translation if available or fallback to default language

Custom Fields

  • Don’t translate – ignore and don’t translate
  • Copy – copy value from default language and stay in sync (good for numbers)
  • Copy once – copy value from default language only once (good for creating different field values per language)
  • Translate – translate into other languages

Admin Texts

Register strings in the wp_options table for translation. For example, the site title or widget settings are often stored in this table. By registering them in the configuration file, you ensure users can translate them.

Shortcodes

Register texts or attributes within shortcodes for translation.

Updated
October 16, 2024