How to translate your front store?
By default Evershop is translated into English. You can translate your front store into any language you want. You can also provide your own translations for your store.
1. Set the language of your front store
To set the language of your front store, you need to go to update the
config/<yourenvironmen>.json file located in the root directory of your project. Edit the
shop.language property and set the language code of your language. For example, if you want to translate your front store into French, you should set the
shop.language property to
..., // other configurations
The language code is 2 letters long. You can find the list of all the language codes here.
2. Create a new folder for your language
From your root directory, create a new folder named
translations and inside it create a new folder named with the language code of your language. For example, if you want to translate your front store into French, you should create a folder named
fr inside the
3. Translate your store by using csv files
Inside the folder you just created, create a new file named
general.csv. This csv file has 2 columns: the first column is the text in English and the second column is the text in your language. You can translate the text in the second column.
"Hello, world!",Bonjour le monde!
You can create as many csv files as you want. For example, you can have a file named
catalog.csv to translate the catalog pages like the category page, the product page, etc and a file named
checkout.csv to translate the checkout pages like the cart page, the checkout page, etc.
You can find a sample of the
translations folder here.
Changing the language of your front store requires running the
build command again.