Solution:
Step 1:
Create a i18n folder in app/design. In that create csv files for the languages we need in the website as shown below.
Step :2
In order to create a multi-language Magento 2 store:
1. Add a New Store View.
- Go to Admin Panel > Stores > All Stores and press the Create Store View button.
2. Fill in the Store View Information.
- Choose store the store-view will be linked-to in Store select box.
- In the Name field, you correspondingly set the name of the store-view.
- Set the code of the store-view (it can be used in the URL).
- Enable the store-view in Status select box.
Once you have finished with all the changes don’t forget to press the Save Store View button.
3. Edit Store-View.
Also, you can edit store-views, e.g. change the name of a store view. You can do this by clicking on store-view link and editing its fields easily, just like during the creation.
4. Set Locale (Set Language).
- Once creating a new store view has been done, you have to set it’s locale by going to Admin Panel > Stores > Configuration > Store View > [Store View Name].
- In the General section find Locale Options and set a language for the store view.
- Once you have finished with the store view locale configurations don’t forget to press the Save Config button.