Worky
Localization & Multilanguage
WordPress theme contains a localization option which allows making your website bilingual or multilingual. Thus, your site can attract more visitors from foreign countries. Using plugins and other options listed below, you can customize your site, add posts, create new tags or categories, and then easily change the language for each of them.
Engine localization
WordPress offers an effortless way to change the language of your website. Please, refer to the steps indicated below:
- Go to Settings -> General section in your website dashboard;
- Look up the Site Language option at the bottom of the page. Choose the needed language in the dropdown menu and click on the Save Changes button;
If you do not see the language you want to use in the list, you can install the required language packs manually.
WordPress uses a gettext system for translations, where a main .pot template file can be found and used. Each language consists of two files: with .po and .mo extension. You will need a .mo file for your language.
- Go to the WordPress translation teams page. Check if there is a WordPress translation available for your language;
- Click on the percentage value to see the status of the translation progress in your language and then click on the current WordPress version;
- You will get to GlotPress (a web-based app used by WordPress team to manage and translate WordPress projects);
- Scroll down until you see the Export section;
- Select Machine Object Message Catalog (.mo) in the dropdown, and then click on the Export link.
- Repeat the same actions for Portable Object Message Catalog (.po) and then click on the Export link;
- Download and unzip the language pack on your computer. Connect to your website using an FTP client. Once connected, upload the language files to the /wp-content/languages folder;
- After completing the upload, go to the WordPress dashboard;
- Navigate to Settings -> General to find the newly added language in the Site Language dropdown.
Manual theme localization(with Poedit)
You may also add localization to your WordPress theme by using Poedit software. Localization becomes possible because of using GNU gettext framework for translation and such types of files as POT (Portable Object Template), PO (Portable Objects), and MO (Machine Objects).
Installing Poedit
- To start creating the localization, first, you need to download Poedit;
- After completing the download, install it on your computer as any software.
Localization using Poedit
- Open Poedit and select Create new translation. In the pop-up window, select the WordPress theme that you need to translate. Your theme's default translation template in /wp-content/themes/theme_name/languages/YYY.pot (where theme_name is the name of your theme and YYY is the default language of the theme). Open it;
- In the appeared dropdown menu, select a language you need to translate your theme to. Click on the OK button and go ahead translating your theme;
- Highlight any string you want to translate in the Source text section. Then, enter a desired translation into the Translation section of the source string:
- After completing the translation, save the file in the same directory as the original template;
- You will get the .po file that you just saved and the .mo file with the same title. Upload them both to the /wp-content/themes/theme_name/ directory on your hosting account;
- Your theme will now appear translated!
Localization with LocoTranslate Plugin
With Loco Translate you can do built-in translation and editing of your files via the WordPress admin panel, and use such tools as extracting strings and generating templates. Loco Translate has protected language directory for saving custom translations. It supports native MO file compilation and PO features. The plugin has such important features as configurable PO file backups and built-in WordPress local codes.
Installing Loco Translate plugin
- Log into WordPress admin panel and install your plugin's ZIP archive via Plugins -> Add new.
- Activate the Loco Translate plugin after an installation.
- Go to Loco Translate -> Home in the left-hand menu to start translating.
Check the Beginner's Guide and Technical overview to see the detailed instructions on how to use Loco Translate plugin.
Additional information about localization is also available at Zemez Support Portal.
Multilanguage with Polylang
Polylang plugin provides plenty useful options, such as RTL language support, ability to make your site either bilingual or multilingual, automatic copy of categories, post tags, etc. when adding a new post or page translation. It also includes customizable language switcher.
Installing Polylang plugin
Make sure you are using WordPress 4.x or later and that your server is running PHP 5.4 or later (the same requirement as for WordPress itself). If you tried other multilingual plugins, deactivate them before activating Polylang.
- Log into WordPress admin panel and install your plugin's ZIP archive via Plugins -> Add new.
- Activate the Polylang plugin after an installation.
- Go to the languages settings page and create the languages you need.
- Add the language switcher widget to let your visitors switch the language on a website.
Note! Your theme should include the corresponding .mo files (Polylang automatically downloads them when they are available for themes and plugins in this repository). If your theme is not internationalized yet, please refer to the Theme Handbook.
Multilanguage with WPML
WPML plugin is a user-friendly plugin which helps you build multilingual sites, both personal and corporate ones. With WPML, you will be able to translate pages, menus, posts, and whole texts. Every WordPress theme that uses API runs multilingual with this plugin.
Installing WPML plugin
The first time you use WPML, you need to download it and install manually. Then, register to receive automated updates to future versions.
- Log in to your WPML.org account.
- Navigate to the Downloads section.
- Download the needed WPML components. You will receive a ZIP file for each one of the WPML's components.
- Log into the WordPress admin panel, and activate the WPML plugin through the Plugins menu.
- Then, install the components' ZIP archives via Plugins -> Add new.
- Activate the newly added plugins.
- Follow the WPML's setup wizard instructions to add new languages to your website.
You can find more detailed instructions and guides in the official WPML Documentation.
Additional information about localization is also available at Zemez Support Portal.