WordPress is one of the easiest to use website and blog creation tools out there, and arguably the most popular one. If you’re a business and have clicked on this article, you’re here because you’re probably using it too. Now that you’re looking to expand into new markets, it’s a good thing you’re interested in learning more about WordPress localization because this is exactly the process you need to go through to ensure a seamless user experience for global audiences.
What’s WordPress localization about?
Localizing your WordPress website doesn’t mean translating text word-by-word but addressing cultural nuances and language-specific layouts too, as well as making sure the site is optimized for users across various locales.
This being said, to effectively localize your WordPress website, you must translate content, ensure theme and plugin compatibility, provide a language switcher, adapt date and time formats, display currency correctly, consider image and media adaptations, and be mindful of any cultural differences.
Why go through all the hassle? Well, by localizing your site, you can reach a wider audience, improve user experience, enhance SEO, increase conversions, and strengthen your brand reputation—and these are just some of the many benefits of localization backed up by numerous statistics.
Internationalization, the (ideal) first step
Internationalization is what happens before localization takes place. It’s the process of making themes, plugins, and the WordPress core adaptable for use in different languages and regions. This step is important because it prepares the software to be translated. You can check how well your website can adapt to different languages through internationalization testing.
The core idea behind WordPress internationalization is to write code in a way that allows text strings to be replaced with translated equivalents without altering the underlying code. Once a theme or plugin is internationalized, the localization process begins, where translators create files containing translations for specific languages.
Improve your localization process
Discover an easy to use and affordable localization app.Several ways of localizing WordPress
There’s more than just one way of localizing a WordPress website, and what you choose depends on your resources and technical expertise:
- Using WordPress multilingual plugins – These tools make the localization process easier for non-developers. They manage translations and often include other localization features such as SEO and user-friendly language switchers.
- Using a translation management system (TMS) – Another great option, especially for larger websites or businesses with complex translation needs. Platforms like POEditor help manage and streamline the entire translation process, often offering machine translation, translation memory, and collaboration tools for professional translators.
- Manual translation using .po/.mo files – This is a method used by those who prefer more direct control over the translation process. It’s commonly used by developers and technical users who are comfortable working with code.
- Automatic machine translation – Not exactly ideal given that machine translations may lack the nuance of professional translation, but they can be a good starting point. This method relies on translation engines like Google Translate or DeepL to provide translations instantly.
- WordPress Multisite – A feature offered by WordPress, it enables you to manage multiple languages by setting up a separate site for each language within a network.
Of course, you don’t have to choose just one option. Many businesses go with a hybrid approach. For example, some may use a plugin for simpler languages and rely on custom coding for RTL languages, while others might use automatic translation for initial content and later refine the translations using a TMS.
What to consider when localizing your WordPress site
As you can probably tell by now, WordPress localization is a rather complex process which involves several steps and considerations:
Translating content
This is the most obvious aspect of localization. Keep in mind that direct translation of text is not enough—localization also takes cultural and contextual factors into account to ensure the translation feels natural to the target audience.
Along with posts and pages, other elements that require localization are menus, widgets, forms, calls to action, and user-generated content. Some challenges may arise; translating idioms, slang, puns, or colloquial expressions can be particularly tricky.
Translating themes and plugins
Content translation is the main thing but you also want to make sure that the themes and plugins used are properly adapted for other languages too. Theme and plugin localization begins at the development stage. Developers need to ensure that all text strings in the code are wrapped in special WordPress functions that allow for translation.
The two most commonly used functions are __()
and _e()
. These functions work with WordPress’s translation infrastructure to allow theme and plugin text to be easily translated via .po
(Portable Object) files and their corresponding .mo
(Machine Object) files.
Locale files (.mo/.po)
WordPress handles localization through special files known as .po
and .mo
files, which are integral to the translation process. The .po
(Portable Object) files contain the actual translations in a human-readable format. Translators edit these files, adding their translations for each text string that appears on the website.
Once the .po
file is complete, it is compiled into a .mo
(Machine Object) file, which is the binary version used by WordPress. The .mo
file is what WordPress reads to display the translated text on the front end of the site. These files are usually located within the theme or plugin’s languages
folder. Note that these files must be generated and updated every time new text strings are added to the theme or plugin.
Another file type you might encounter during the localization process is the .pot
(Portable Object Template) file. These files are similar to .po
files in that they store text strings, but with one key difference:.pot
files do not contain any translations. Instead, they typically hold the original source strings, in the form of message IDs (msgid
).
Setting locale in WordPress
WordPress has a built-in setting (available to the site’s administrators) that makes it easier to serve the site in different languages. Under Settings > General, you can change the site’s language. Once a language is selected, WordPress will automatically download the corresponding language pack if available.
If your site is going to be available in multiple languages, you’ll also need to set up language-specific versions of your content and implement a way for users to switch between languages. Most multilingual plugins offer a simple language switcher that can be added to your menu or sidebar.
Language files in themes/plugins
In addition to changing your site’s default language, you’ll also want to ensure that all themes and plugins are properly localized. Most well-coded themes and plugins will include a .pot
file, which is a template for translation. You can use this file to create new .po
files for each language you want to support, which can then be translated and compiled into .mo
files.
Right-to-Left (RTL) support
If you’re localizing your site for languages such as Arabic or Hebrew, which are written from right to left, you’ll need to make sure that your theme supports RTL layouts. WordPress includes built-in RTL support, and developers can use the is_rtl()
function to conditionally load RTL-specific stylesheets or assets. You’ll also need to test your website thoroughly in RTL languages to ensure that the layout, typography, and navigation function correctly when mirrored.
Multilingual SEO
A properly localized website is one that has also been optimized for search engines in multiple languages. To do this, you’ll want to use hreflang
tags, which help search engines understand which language your content is in and direct users to the appropriate version of the page. Most multilingual plugins automatically add hreflang
tags for you.
Consider translating metadata, including meta descriptions, alt text for images, and even URLs, if appropriate. Other tasks relating to multilingual SEO include performing multilingual keyword research, adjusting the date and time formats along with the units of measurement, and adding a currency switch, if needed.
Localize WordPress with POEditor
When it comes to efficient localization, POEditor stands out as a powerful option to streamline the translation process for WordPress websites. And we’re not the only ones saying it—WordPress vouches for us too.
To simplify the localization process, we developed our own WordPress translation plugin that integrates directly with your WordPress dashboard. This plugin allows you to manage your translation projects by linking your WordPress site to the POEditor localization platform.
Once your site is connected to POEditor, you can begin setting up your WordPress project and translating strings with ease. You can quickly add languages to your translation project by adding your local WordPress language files (.po or .pot files) to the languages you want to translate.
Our localization platforms allows you to tap into a network of professional translators from integrated language services providers if you don’t have in-house linguistic expertise. You can also opt to use machine translation for a quick first draft, and then refine it with human expertise to ensure that your content is culturally appropriate and accurate.
Oh, and one last thing—you pay for only what you need with POEditor’s scalable pricing.