# Adding New Language

In order to add new language to the template, follow the following steps:-

1\. Make a new .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.

![](https://258187622-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3SI3541XczU8y8WVdI%2F-M3ZsQ-u8r86BGICAiQK%2F-M3ZtbeZJIPhivryBHvK%2Fimage.png?alt=media\&token=cdb8236b-d7d4-402b-85da-4a0fbeb45c38)

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 a .js file, earlier we created a .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.

```
import saMessages from '../locales/es_ES.json';
import {esES} from '@material-ui/core/locale';

const saLang = {
	messages: {
		...saMessages,
	},
	muiLocale: esES,
	locale: 'es',
};
export default saLang;
```

![](https://gblobscdn.gitbook.com/assets%2F-LzcESYFYdNFkCg00g4w%2F-M-fINji7lY5crjW8EiM%2F-M-fLF9XnHEpiE5CppwC%2Fimage.png?alt=media\&token=45e5b9c5-9965-4e78-80bf-2e8f152dfbf5)

5\. Now go to the file with the following path:-

```
src/@crema/core/LanguageSwitcher/data.js
```

and add the new object corresponding to the new language, code should look something like this:-

![](https://258187622-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3SI3541XczU8y8WVdI%2F-M3ZsQ-u8r86BGICAiQK%2F-M3Ztu_l1sT-xgUdkPO6%2Fimage.png?alt=media\&token=d722d95a-9a3d-4465-bb70-6bc4a4464380)

![](https://258187622-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3SI3541XczU8y8WVdI%2F-M3ZsQ-u8r86BGICAiQK%2F-M3ZtzWVk-pW6TI-kKU1%2Fimage.png?alt=media\&token=56420a5b-6a26-4d79-8c1f-40577e131ba6)

6\. In the last step, open the file on the path:-

```
src/shared/localization/index.js
```

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:-

![](https://258187622-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M3SI3541XczU8y8WVdI%2F-M3ZsQ-u8r86BGICAiQK%2F-M3Zu6Dseu4biK2jrYyU%2Fimage.png?alt=media\&token=5678790e-d167-4e65-a7bc-168e24f649b2)
