In order to add new language to the template, follow the following steps
In order to add new language to the template, follow the following steps:-
1. Make a {new_locale}.json file in the folder with the path :-
src/shared/localization/locales
2. Copy the content of the file 'en-US.json' kept adjacent to the file you made and paste it into your file. The path of file 'en-US.json' is:-
src/shared/localization/locales/en_US.json
3. In the next step, you need to translate the values of translation variables into the new language.
"ecommerce.exclusivePrice": "Price","ecommerce.mrp": "MRP","ecommerce.off": "OFF","ecommerce.addToCompare": "Add to compare","ecommerce.addToCart": "Add to cart","ecommerce.orderSummary": "Order Summary",
4. Now make a new file in the folder with the path:-
src/shared/localization/entries
The name of the file should be same as the above-created file, just the extension will be different, this will be {new_locale}.js file, earlier we created {new_locale}.json file.
Copy the following code, paste it into the newly made file and modify the content according to the changes suggested in the image given below the code.
and add the language code defined in the above step and assign the value of the variable exported in step 4 to this code. Follow the following code for reference:-