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.
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.
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:
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
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.
Click the Details link on the row to begin translating the given string.
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.
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.
Some strings may contain special characters; characters that must not be translated, such as the type specifier used in the
printf PHP functions. Given the example from the above screenshot, the sentence contains two
%2$s which are handles for the script name and a WordPress function name
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
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.
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.
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.
- WordPress Polyglot Handbook
- Petya Raykovska: Does WordPress Speak Your Language?
- Naoko Takano: Build Your Locale Style Guide
- Yoav Farhi: Localization – Beyond Translation
- GlotPress; the plugin for collaborative translation tool.
- Follow WPPolyglots in Twitter: @TranslateWP
Localization vs. Internationalization on W3C
Join the Envato Tuts+ Translator Team