A Translator’s Guide to WordPress Localization (l10n)

Besides features that are continuously being developed and improved, localization (l10n), according to Petya Raykovskain her talkat WordCamp Switzerland 2015, is one of the factors that makes WordPress and its community grow so much year on year.

A Translator’s Guide to WordPress Localization (l10n)

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), andEmoji(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 ThemeKeeper Tuts+!

Did you know we pay translators at Tuts+? VisitJoin the ThemeKeeper Tuts+ Translator Team to find out more.

A Translator’s Guide to WordPress Localization (l10n)

Getting Started

WordPress projects aredivided into several teamswith 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 theTranslating WordPresspage. Therein you will find a list of languages which WordPress has been translated into.

A Translator’s Guide to WordPress Localization (l10n)

With 150 languages registered, it is very likely that WordPress is already available in your language. Otherwise, you cansubmit a request to the Polyglot teamto 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

A Translator’s Guide to WordPress Localization (l10n)

Translate-able text in WordPress is referred to as a “string”. Within the source code, this string is delared with aWordPress GetText functionsuch as__(),_x(), andesc_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 Translator’s Guide to WordPress Localization (l10n)

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.

A Translator’s Guide to WordPress Localization (l10n)

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 Translator’s Guide to WordPress Localization (l10n)

Special Characters

Some strings may contain special characters; characters that must not be translated, such as thetype specifierused in thesprintfandprintfPHP functions. Given the example from the above screenshot, the sentence contains twotype specifiers:%1$sand%2$swhich are handles for the script name and a WordPress function namewp_enqueue_scriptsrespectively.

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>.

A Translator’s Guide to WordPress Localization (l10n)

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.

A Translator’s Guide to WordPress Localization (l10n)

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 theTranslation Teampage.

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.

A Translator’s Guide to WordPress Localization (l10n)

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#polyglotschannel. 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 namedWordPress 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