Advertisement
  1. Web Design
  2. WordPress

A Translator’s Guide to WordPress Localization (l10n)

Scroll to top
Read Time: 5 min

Besides features that are continuously being developed and improved, localization (l10n), according to Petya Raykovska in her talk at WordCamp Switzerland 2015, is one of the factors that makes WordPress and its community grow so much year on year. At the time of writing, WordPress speaks more than 150 languages including a few which you might not have heard before; Javanese (jv_ID), Uyghur (ug_CN), and Emoji (yes, Emoji is now a language).

Some parts of WordPress, as well as derivative projects such as themes, plugins, and apps remain unfinished or completely untranslated. In this tutorial, I’ll show you how and where to get started translating them into your locale.

L10n or I18n?

This tutorial focuses on localization (l10n) rather than internationalization (i18n). The difference is subtle, but significant. 

  • Localization is the process of adapting a product for different languages and cultures. Translation is part of the localization process.
  • Internationalization refers to preparing a product so that it can be localized. This is something more relevant to developers.

Aside: Help us Translate Envato Tuts+!

Did you know we pay translators at Tuts+? Visit Join the Envato Tuts+ Translator Team to find out more.

Help us translate Envato Tuts
Envato Tuts+ tutorials are currently available in 41 different languages

Getting Started

WordPress projects are divided into several teams with each managing a specific responsibility. The team which manages and is responsible for internationalization and localization goes by the name “Polyglots”, which literally means “one knowing or using several languages”.

To begin translating, you will need a WordPress.org account–don’t confuse this with WordPress.com. Once you’re logged in, go to the Translating WordPress page. Therein you will find a list of languages which WordPress has been translated into.

A gray bar with three menu and a search input field and four rectangles holding various English translationsA gray bar with three menu and a search input field and four rectangles holding various English translationsA gray bar with three menu and a search input field and four rectangles holding various English translations

With 150 languages registered, it is very likely that WordPress is already available in your language. Otherwise, you can submit a request to the Polyglot team to include a new locale. Once you have selected the language, pick which project you would like to work on from the following categories: 

  • WordPress
  • Themes
  • Plugins
  • Metas
  • Apps
Gray bar with three link menu and search input field and four rectangles holding WordPress projects Gray bar with three link menu and search input field and four rectangles holding WordPress projects Gray bar with three link menu and search input field and four rectangles holding WordPress projects
List of projects in the WordPress category.

Translate-able text in WordPress is referred to as a “string”. Within the source code, this string is delared with a WordPress GetText function such as __()_x(), and esc_html__(). Each project might contain a large number of strings, like WordPress Core which has roughly 4,000 strings, and each of these strings is displayed in a row, as you can see below.

A table consiting five rows and three two columns highlighted in green colorA table consiting five rows and three two columns highlighted in green colorA table consiting five rows and three two columns highlighted in green color
List of strings translated into Japanese. 

Click the Details link on the row to begin translating the given string.

Translating

Enter your translation within the textarea, noting a couple of things:

Style Guide and Glossary

Each project might include guidelines or a style guide, and a glossary. Guidelines are generally rules about grammar, the use of punctuation, and consistency of the translation across the project. The glossary is a list of words and phrases with their standardized translation. Words or phrases registered in the glossary will be shown on the string with a tooltip allowing translators to find the word or phrase for quick use.

Japanese glossary

Ensure sure your translation conforms with the respective style guide and the glossary when available. Additionally, meta information (the “Context”, “Reference”, and “Comment” on each string) can help keep your translation maintainable.

A string with comment and context.

Special Characters

Some strings may contain special characters; characters that must not be translated, such as the type specifier used in the sprintf and printf PHP functions. Given the example from the above screenshot, the sentence contains two type specifiers%1$s and %2$s which are handles for the script name and a WordPress function name wp_enqueue_scripts respectively.

Furthermore, although this practice is discouraged, some strings in the themes, plugins, and even in the WordPress core itself still contain HTML elements which must not be translated. For example, you wouldn’t translate <strong></strong> or <span></span>.

An example of an HTML element in a string in bbPress.

Technical Words and Phrases

You may encounter technical words or phrases such as “resource”, “callback”, “endpoint”, “REST base”, etc. which might be difficult to properly translate in your language. These words might not yet be included in the dictionary in some languages. Perhaps they are there, but the meaning is out of context when applied to WordPress or just sounds awkward.

In this case, I’ve seen some languages leave these words in English. But, if you are familiar with PHP, I encourage you to dig into the source code, or seek advice from the General or Project Translation Editors to find the best possible translation within the context.

An example of a string in German retaining the word "Callback".

Translation Editors

The General and Project Translation Editor are the people responsible for maintaining the translation quality of the language as well as formulating the glossaries and style guides. 

The difference between “General” and “Project” is that the General Translation Editor (GTE) oversee all categories; they are able to review translations in Themes, Plugins, Apps, and WordPress. The Project Translation Editors only oversee one or two particular categories. Meet the team for your locale in the Translation Team page.

Your new translation, once submitted, will be put on hold for their review. Keep in mind that this is a purely voluntary project. The Editors might be occupied with other projects and commitments so they may not always be available to review new submissions every day. Be patient.

List of Armenian strings of under reviewed. 

So, What’s Next?

I would recommend you get involved and say hi! The WordPress community is full of friendly and helpful people.

The Polyglot team, as well as the other teams, is available in Slack under the #polyglots channel. You can join the conversation using your WordPress.org account. The team also hold a meeting once in a week where one of Polyglot team leads addresses issues, announces updates, answers questions and provides some technical details regarding WordPress translation.

Furthermore, the Polyglot team also host an event named WordPress Translation Day. This event holds 24 hours of live streaming sessions educating translators as well as developers with tips and best practices to make their plugins and themes ready for translation. The event had been held, so far, twice. In 2015 it drew 448 participants from over 100 countries, and in 2016 those numbers were doubled.

WordPress, being a free and open-source project, relies heavily on community contribution. Translating WordPress into your language is a great way to participate in the project even if you are unfamiliar with coding.

Further Resources

Advertisement
Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Web Design tutorials. Never miss out on learning about the next big thing.
Advertisement
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.