Just as many other popular platforms, the default language of Magento is English. However, as your store scales up, there might be occasions when you need to serve customers whose native languages might not be English. On these occasions, you’ll need to set up multi language for your Magento store.
This guide will walk you through how to find and download translation packages for your store, as well as how to install and set them up.
1. Download Magento translation package
To download language packs, head over to magento-l10n. Here you will find repositories for various languages. These repositories are all automatically generated based on translations provided at the Crowdin Project.
Crowdin Project is Magento official translations project for Magento, including Magento Open Source and Magento Commerce so you can be assured that the translations are of good quality. But the downside is that there’s still a lack of many languages, and most of the available ones are incomplete
To facilitate translation progress, Magento has also started the Magento Localization Community Engineering Project.
2. Install translation package
There are two ways you can go about installing your translation package(s): via composer (recommended) or by manually copy-pasting the package (less technical, not recommended).
Installing translation package via composer
Locate the package that you want to install at
magento-l10n repository. If you find the naming of packages a bit too hard to keep track of, do refer to the list of ISO Language Codes for a better idea.
For example, let’s try to install French (France) language, which in this case is the
cd <your magento path> composer require magento2translations/language_fr_fr:dev-master php bin/magento cache:clean
Installing translation package manually
In order to install the translation package manually, you’ll first need access to your Magento file system .
Step 1: Download the zip file containing your language’s translations.
Step 2: Copy & paste/upload the contents of the zip to
<your magento path>/app/i18n/magento2translations/language_fr_fr.
Step 3: The composer files should then be located like this
<your magento path>/app/i18n/magento2translations/fr_FR/fr_FR.csv.
Step 4: Go to your Magento admin panel and clear the caches.
3. Create a new store view for your language
In order to make language switching easier, you’ll want to create a new store view specifically for this new language.
Log into your Magento backend, go to Stores > Settings > All Stores.
Click Create Store View.
A new configuration panel where you’ll be able to configure your new store view.
- Store: select the parent store of this new store view
- Name: the name of this view. This will appear in the language chooser in the store header (e.g. French)
- Code: set an unique code for your store view. Codes must be in lowercase and are used to identify this store view (e.g.
- Status: set to Enabled in order to activate this view and vice versa
- Sort order: set the order in which this view is listed with other views, with 0 being the highest order
Then, to configure the language for this store view, go to Stores > Settings > Configuration. Select your newly created store view on the upper left dropdown list.
And in the General tab, expand Locale options.
Set Locale to the language you’ve just downloaded and installed. For example, since we just installed the French (France) language pack
language_fr_fr above, we should now select French (France) as our Locale.
Then click Save Config and go to your storefront to check the results. You should now be able to see new language for your new store view.
Hope this helps!