The official Magento 2 language packs, which can be found on GitHub at https://github.com/magento-l10n, are relatively unknown so far. The purpose of this article is to increase awareness and make the installation easier.
My colleague Sonja has already written a blog post about how to contribute to Magento 2 language packs – because the language packs are also maintained by the community. Magento provides the framework and the infrastructure.
The installation is done via Composer. The following is entered on the command line:
composer require community-engineering/language-de_de
Please replace de_de with your locale code. You can see the list of available locale codes on GitHub.
The installation then takes place automatically, for example with the following output:
$ composer require community-engineering/language-de_de
Using version ^0.0.23 for community-engineering/language-de_de
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing community-engineering/language-de_de (0.0.23): Loading from cache
Writing lock file
Generating autoload files
The language pack is then directly activated.
1. Emptying the cache can be a useful measure, even if it worked without it during my tests.
2.The shop language may not yet be set to a certain language, e.g. German. This can be set in the configuration under General -> Locale Options -> Locale. Please note that this setting is StoreView specific and can also be set per StoreView.
3. The language of the admin user can be set to English. This can be defined in the account settings:
Why use the official Magento 2 language pack?
For Magento 2 there are often several additional language packs for each language. For example the following other German language packs are available:
The official Magento 2 language packages are (in my opinion, mostly based on the German language) the most advanced in terms of quality and quantity. In contrast to the other modules, not only employees of one company contribute to the translations. In purely subjective terms, the number of translations that do not fit one hundred percent is significantly lower with the official language packs than with the alternative language packages.
Author: Andreas von Studnitz
Andreas von Studnitz is a Magento developer and one of the Managing Directors at integer_net. His main areas of interest are backend development, Magento consulting and giving developer trainings. He is a Magento 2 Certified Professional Developer Plus and holds several other Magento certifications for both Magento 1 and Magento 2. Andreas was selected as a Magento Master in 2019 and 2020.