Magento 2 7/11/2024

How to contribute to Magento 2 translations

The structure of Magento, one of the most widely used e-commerce platforms in the world, is ready for use by international companies that serve customers in multiple countries in different languages.

Magento's default language is English. Each new installation is displayed will show English texts in the frontend and admin area of the shop. If you want to add more languages, take a look at the GitHub repository for Magento 2 localizations. There you will find a comprehensive number of language packs, the obvious ones like Portuguese for Brazil and the more niche-oriented ones like informal German, Catalan, and English for pirates. Arrr!

To better understand the status of the language packs, visit the Magento 2 project on Crowdin, a translation platform.

So many languages. And not one is 100% translated. If your language is missing, it can be added, too. Let’s add German for pirates!

These translations are provided by the global Magento community. Since Magento is a complex software with a growing list of features, translations are a never-ending task. That's why contributions to the translations are very welcome.

3 Reasons Why You Should Contribute to Magento 2 Translations

There are many good reasons to contribute to Magento 2 in general. Here are some specific reasons why contributions to translations may be the right thing for you.

Learn more about Magento

By adding translations, you get a great overview of Magento's features and an insight into some details. If you plan to become a Magento 2 Certified Solution Specialist, translating is the ideal way to learn about Magento's features while contributing to the community.

Easy Setup

This type of contribution doesn't require a resource hungry developer setup. At the Contribution Day before Imagine 2019, I only brought my iPad with an external keyboard with me. That's all I need for translations. Open your browser, go to Crowdin, and get started.

Results in minutes, not hours

Got 15 minutes? Then let's get some translations in! Most phrases are not too hard to understand so you can add a translation immediately without having to delve into a complex subject. The feeling of accomplishment is a free gift to all contributors. 

Are you convinced that helping the global Magento community with some translations is a good deed you can do? Great!

A Beginner's Guide to Magento Translations

Most folks have some questions or assumptions that will keep them from contributing. Do they apply to translation contributions? Let's check.

Do you need to be able to code?

No.

Do you need to speak a dozen languages?

No. English plus one other language is enough.

Do you need to be able to use Git?

No.

Do I need a special software like an IDE (integrated development environment)?

No. Translations are entered on Crowdin, a website made for translation projects. If your device has a web browser, you are good to go.

Are there other requirements?

Yes, and you'll fulfill them both in about two minutes:

    1. You need to have a Crowdin account. You can also use a social login like Google or GitHub to register at Crowdin.
    2. In order for Magento to be able to use your translations, you need to agree to the Magento Contributor License Agreement. The form is at the bottom of the page.

Tips & Tricks for New Translators

To help you get started, I have put together some tips and tricks that might help you explore this new area.

A small glossary

String

For translators, strings have nothing to do with musical instruments. A string is the term, sentence or sometimes a whole paragraph that is translated.

Examples:
"Order"
"Go to checkout"

Variables

Some strings contain variables that are filled by the system. In Crowdin, these variables are highlighted and show a hint to not translate them when you hover over them.
In order to get a working translation, keep the variables as they are. You can change their position in the string, but make sure to keep all characters of the variable together as one unit.

Examples:
%1

CSV

CSV, short for comma-separated values, is a file format. Several strings are collected in one CSV file.

Language Pack

All CSV files of one language are combined in a language pack.
The name of a language pack indicates which language contains (lower case letters) and for which country it is intended (upper case letters).

Examples:
language-en_GB is the English language pack for Great Britain.

Work on the right strings

In the Magento 2 project on Crowdin you will find an extensive directory tree when selecting a language. Make sure you pick a CSV file that is located in the master folder at the top level. Other top level folders such as 2.0.2 are abandoned and do not require translations.

Branch
Whether you want to translate admin notifications or the advanced checkout, always make sure the CSV you picked belongs to the master folder.

Have a look at the defined terms

Some words have a specific meaning which has been documented as a term. You will notice these terms in strings as they are underlined with a dashed line. Hovering over these, you will either be prompted with a definition in the original language or with a translation of the target language.

Mind the context

What you will probably miss in Crowdin is an option to see where the string is shown. There is no visual context available. So you only have is the name of the CSV file (which usually points to the feature) and the other strings in the CSV file that might give you a better understanding of the feature.

Depending on the context, a term can have very different meanings and translations. For example "order" could refer to items sold, the sequence of objects, a sociopolitical system and a lot more. In the Magento context, "order" is usually a purchase. However, we still don't know if it's used as a verb or a noun which would lead to different translations in many languages.
If a string is ambiguous, I try to get more context in order to find the correct translation. These are my preferred context providers:


Take a look at Magento

When you open the feature in Magento, you usually get a good understanding of the string's meaning.


Check out the User Guide

When the Magento admin doesn't help, I look up the feature in the Magento User Guide to get more background information.


Magento Teams

Magento Contribution Days are a great place to work on translations. Often, other people join your effort to improve translations. If one of Magento's technical writers is around, choose a seat nearby. They often have a great overview of Magento's features, know many resources to search for context, and have great empathy when it comes to finding the right word or tone. After all, they know what it takes to make complex software understandable.

Quality Assurance

If you let a lot of people translate, they will each bring in their own understanding of technical terms as well as different views on spelling. Some of these differences can be settled by looking it up in the dictionary. Others are more complex.
At Crowdin, there are several levels of contributors for Magento translations:

Translators

Translators can translate strings and vote on suggested translations

Proofreaders

In addition to translating and voting, proofreaders can approve or decline translations

Managers

They can translate, vote, approve, decline and also appoint proofreaders

Currently, all translations entered in Crowdin are integrated into the language packages. Thanks to this approach, it's possible to get a higher translation coverage in a shorter period of time. This will change in the future.

Technical Workflow

So you want to know how the translations you enter on Crowdin make their way into Magento? You can satisfy your curiosity right here, in the first recorded session of Magento Community Engineering hangout about translations. At 12:30 the technical process is discussed.

Any questions?

Depending on your previous experience with translations, it may take some time to get into the groove with Crowdin.
You are not alone in this. Within the Magento Community Engineering Slack Team, you will find a translation channel where other contributors discuss technical translation issues. For some time now, Magento's Community Engineering Team for translations has been holding a meeting for anyone interested. As you can see above, the first one of these meetings about Magento 2 translations is available on Youtube.
On Crowdin, you will also see that some people raise questions about ambiguous strings.
For a more technical guide on how to work with translations, the DevDocs section on translations will be the best fit.
And of course you can always ask questions right below this article in the comments section. Let me know if there is an important detail missing from this article.

Happy translating!