Home » Guide » How do I make my theme multilingual?

How do I make my theme multilingual?

January 10th, 2011 by Amir

WordPress sites include different kinds of elements, all shown on the page. You need to make sure that all are multilingual-friendly for your site to display fully multilingual.

Page / post content

WPML creates a new page for each translation and links all translated pages together, so that visitors can switch between them.

If you are using WPML’s side-by-side translation editor, you need to specify which custom fields require translation.

Theme and plugin texts

Some texts are hard-coded in the PHP. Most often, they appear in the theme or in plugins.

You can translate them either by providing a .mo file for the theme and each plugin or using WPML’s String Translation mechanism.

Strings must be wrapped in gettext calls in order to be translatable.

Admin texts

Some texts are entered in the WordPress Admin, but don’t belong to any page or post. For example, website’s the tagline, is entered in Settings->General.

WPML can translate these texts. For this, you need to tell it which strings require translation.

queries in 0.511 seconds.