Adding Localization Using WPML

From this tutorial, you’ll learn how to add localization to your WordPress template and plugins using the WPML plugin.

zemez wordpress themes

Installing WPML

  1. First, let’s install WPML to WordPress. To do it you need to get a WPML account. Here navigate to Downloads and download the WPML components package.
  2. Unzip each of the components. Then add all of the components contained in the separate folders to one archive.
  3. Upload them to the wp-content/plugins folder using the FTP tool or Upload option in your hosting server cPanel file manager.
  4. Uncompress the package.
  5. Now navigate to WordPress Dashboard -> Plugins tab and activate WPML components.

WPML Localization

  1. Let’s locate theme and plugins localization settings. Locate WPML -> Theme and plugins localization tab on the left of the Dashboard.
  2. Here you can create translations for texts in themes and plugins. You can use the translations you already have, as well as string translation.
theme-plugin-localization

String Translation

1. WPML will scan the theme and locate the text to be translated. It will show you all the strings and you’ll be able to enter the translation right from WordPress Dashboard.
To start manual scanning for texts please, select the theme or a plugin you want to scan and click on Scan selected themes/plugins for strings.

2. You’ll see how many strings are there for translation.

3. Navigate to WPML -> String Translation tab.

string-translation-woprdpress

4. Select the domain (the theme’s or plugin’s name) which texts you need to translate.

wpml-contact-form

5. Click the translations link on the right of each string and add the translation for the text.

wpml-translations

6. When the translation is complete you’ll be able to switch the languages for the themes and plugins on the website. To learn how to do it, please, feel free to read Adding Language Switcher with WPML Plugin tutorial.

How to configure header templates

In order to enable multilingual header and footer templates, please, choose the Translatable only show translated items option under WPML -> Settings -> Post Types Translation.

wpml-1

Under Crocoblock -> Theme Builder choose the language for translation and create a header template.

crocoblock-theme-builder

You can save the header as a template and import it as a base for the translated header.

wpml-options
wpml-widget
wpml-wp-plugin

Make sure you assign the correct menu in the Menu widget.

wpml-general

Now you know how to work with the WPML plugin that solves the problem by allowing your website to become multilingual.

This tutorial is based on Roxxe – Beauty Salon WooCommerce Theme.

Getting Stuck? Feel free to contact our Dedicated Support Team for further assistance.

monster one