- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
WordPress. How to configure multilanguage website using WPML plugin
April 6, 2015
This tutorial shows how configure Multilanguage WordPress site using WPML plugin.
WordPress. How to configure multilanguage website using WPML plugin
-
Activate WPML Multilingual CMS and WPML String Translation plugins:
-
Go to WPML – Languages. Select Current language and click Next:
-
Select language you would like to add:
-
Specify where you would like to set language selector. We are going to add it to header menu:
-
Now we should go to WPML – Theme and plugins localization. Select the way you would like to set translations for WordPress engine. We have selected "WPML will automatically download translation" option:
-
Now you should upload .mo language of your theme file to wp-content/languages folder. You may generate your own .po and .mo files using blank.mo and blank.po files in case translation is not available for you language.
Go to wp-content/languages and upload appropriate .mo and .po files. You should create wp-content/languages folder in case such folder is not available. Now everything is ok, WPML recognized theme language files: -
Go to WPML – Translation options, access Custom posts section. Select Translate options for all custom post types:
-
Let’s check how you can translate pages. Go to Pages section and open Home page. Click on Translate:
-
Copy the content from English. Change content. There you can replace original text with translated one.
Be sure to keep structure of code, as layout of home page is based on shortcodes. We have changed some titles just as example. You can go ahead and translate all text. Click Publish: -
Now we can sync menus. WPML will synchronize translated pages and add them to menu. Go to WPML – WP Menus Sync. We can see that menu for home page can be synchronized as we set translations to this page. Click Sync at the bottom of page:
-
Select menu items and click on Apply changes:
-
Now Home menu appears in Appearance – Menus section:
-
Refresh Home page. We can see English version of home page with Language switcher. You may remove some menus so that the language switcher can fit in one row:
-
This is how Spanish version looks. We can see our translated/customized content. Slider and other elements are missing from home page. That’s because home pages uses shortcodes in order to represent content. You should add appropriate posts and custom posts for your language:
-
Let’s add slide as an example. You can do that in the same way as you have done for Home page. Slider post for your language should have the same structure as for original language. For example, you should set featured image, as slider will not function without the image (it applies to our template, your template may have another structure of slider post):
-
Refresh home page. Now slider shows up in Spanish version.
You should add translations to the rest posts in the same way. It applies to other types of custom posts as well (for example, for services, portfolio, etc.): -
Let’s check how to set translations for Widgets. Our footer is based on footer widgets. You can set translations for widgets using String Translation plugin:
-
Go to WPML – String Translation. Select Widgets in filter. Find appropriate widgets and set translations. Perform the same changes to the rest of widgets:
-
Refresh the page. We have translated footer widgets:
-
You should set translations for all pages, posts and custom posts in order to translate the whole web site. You can add them in the same way as was specified in this tutorial.
Feel free to check the detailed video tutorial below:
WordPress. How to configure multilanguage website using WPML plugin