Skip to main content
⭐️ If you love EverShop, give it a star on GitHub. Thanks!

Translation

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 fr.

{
"shop": {
..., // other configurations
"language": "fr"
}
}
note

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 translations folder.

/translations
/fr

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.

en,fr
"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.

/translations
/fr
/catalog.csv
/checkout.csv
/customer.csv
/general.csv

4. Sample

You can find a sample of the translations folder here.

danger

Changing the language of your front store requires running the build command again.