> For the complete documentation index, see [llms.txt](https://docs.cremawork.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cremawork.com/v-3/development/multilingual/adding-new-language.md).

# Adding New Language

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.

```json
  "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.

```javascript
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;
```

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

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

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

```javascript
const languageData = [
  {
    languageId: 'english',
    locale: 'en',
    name: 'English',
  },
  {
    languageId: 'chinese',
    locale: 'zh',
    name: '中国人',
  },
  {
    languageId: 'spanish',
    locale: 'es',
    name: 'Español',
  },
  {
    languageId: 'french',
    locale: 'fr',
    name: 'français',
  },
  {
    languageId: 'italian',
    locale: 'it',
    name: 'Italiano',
  },
  {
    languageId: 'saudi-arabia',
    locale: 'ar',
    name: 'عربي',
  },
  
//New Locale will be add here
];
export default languageData;

```

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

```javascript
import enLang from './entries/en-US';
import zhLang from './entries/zh-Hans-CN';
import arLang from './entries/ar_SA';
import itLang from './entries/it_IT';
import esLang from './entries/es_ES';
import frLang from './entries/fr_FR';

const AppLocale = {
  en: enLang,
  zh: zhLang,
  ar: arLang,
  it: itLang,
  es: esLang,
  fr: frLang,
  //New Locale will be add here
};

export default AppLocale;

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cremawork.com/v-3/development/multilingual/adding-new-language.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
