In our previous article, we have written about how to change Magento 2 theme for your e-commerce website.
However, if your goods can be sold internationally, having a suitable theme is not enough. The default language of a Magento site is en_US, and while almost all Japanese visitors can still understand an English website, communicating with your visitors in their mother-tongue sells. Having your site theme successfully translated into a certain language that your visitors speak can guarantee you a drastic boost in sales.
Today, let’s talk about how to translate your Magento and Magento 2 theme into another language of your choice. This article introduces 4 steps to make a new version of your site in a new language: Create a new store view, download your desired language package, upload language package to the server and enable the language in store view.
Step 1: Create a new store view
Although store views can be used for many purposes, they are mainly used to present the store in different languages. Customers use the language chooser in the header to change the store view.
In order for your site to have a new language view, create a new store view by:
- In the Magento Admin, click Stores > Settings > All Stores.
- On the Stores page, click Create Store View.
- Store list: Click the name of the store with which to associate this store view.
- Name field: Enter a name to identify this store view.
- Code field: Enter a unique name to identify this store view.
- Status list: Click Enabled. The following figure shows an example.
- Click Save Store View.
Step 2: Download your desired language package
Although some themes may have additional language packages installed, in general, the theme folder does not include language packages.
To check if your theme has the language package of your choice installed, simply go to your theme folder in pub/static/frontend/company_name/theme_name/
For example, let’s say we have 2 folders named “en_US” and “fr_FR”. This means that the theme already supports language package in English (for US region) and French (for French region).
If you don’t find the language you want in this folder, go to Magento Marketplace to find your language package. And download it to your computer.
Step 3: Upload language package to server
There are 2 ways to upload language package to server: using composer or manually.
1. Upload language package using composer
Get vendor name and module name in the file composer.json inside your language package.
composer require [vendor_name]/[module_name]:dev-master php bin/magento setup:static-content:deploy [language] php bin/magento cache:flush
composer require bss/language-de_de:dev-master php bin/magento setup:static-content:deploy de_de php bin/magento cache:flush
2. Upload language package manually
Unzip the French language pack to Magento 2 root folder. /home/account_name/yourstore.com/public_html/
unzip [package].zip app/code/[vendor_name]/[language_region]
Unzip de.zip app/code/bss/de_de
You also can unzip locally and upload them to Magento 2 root folder.
Step 4: Enable the language in store view
- Go to Magento admin > Store > Settings > Configuration
- Select the Store view you’ve just created
- Then go to General > Locale options > Locale
- Then choose the language you want
Magento 2 theme translation: in conclusion
There you have your Magento and Magento 2theme translated on your website. Enjoy your new store view first, so you can understand your customer’s in-mother-tongue buying experience.
So, do you have any more questions regarding your Magento 2 theme translation? Let us know in the comment section below.
Also, if you want to upgrade your theme to a multi-language, rich-featured theme with a 5-star support team, you might want to take a look at the theme we spend months developing: