# Translate the App

Vuely support multilingual feature which helps you to build your app in multilingual. Read the documentation carefully and follow the steps.

### **How To Set Default Language**

Follow the steps if you want to set default language you can choose english, french, hebrew, russian and arabic according to your desired language.

Go to the `public-> javascripts-> main.js`

{% tabs %}
{% tab title="main.js" %}

```javascript
// Change code of the language to set the default language
  var langCode = 'en'; 
```

{% endtab %}

{% tab title="Plain Text" %}

```
```

{% endtab %}
{% endtabs %}

Go to the `routes->session->session.js`

```javascript
// Change code of the language to set the default language
var defaultLang = '?clang=en';
```

After that access any page.

Where languages is type of array which provides you to set of locales. Languages are defined in the `data.js` file under the &#x20;

`routes-> data.js`

{% code title="data.js" %}

```javascript
exports.languages = [{
                        name: "English",
                        icon: "en"
                     },{
                        name: "French",
                        icon: "fr"
                     },{
                        name: "Hebrew",
                        icon: "he"
                     },{
                        name: "Russian",
                        icon: "ru"
                     }
                   ]        
```

{% endcode %}

### **How To Add A New Locale**

Here are the instructions to add a new locale in your app. We are taken an example of **German** that we are going to add.

Create `ge.json` file under the directory `lang->ge.json`that you have just created and define the static strings which you want translate into German, you can check the other locale files how strings are defined.

{% code title="ge.json" %}

```javascript
{
   "general": "Allgemeines",
   "overview": "Überblick",
}
```

{% endcode %}

Add new `"ge"` variable in `app.js` file

{% code title="app.js" %}

```javascript
app.use(i18n({
   translationsPath: path.join(__dirname, 'lang'), // <--- use here. Specify translations files path.
   siteLangs: ["ar","en","cn","fr","he","es","ru","ge"], // add new locales
   cookieLangName : 'ulang',
   browserEnable : 'true',
   textsVarName: 'translation'  
}));
```

{% endcode %}

Now you need to add your locale inside the `data.js` file under the `routes-> data.js` directory.

{% code title="data.js" %}

```javascript
...
exports.languages = [{
                        name: "English",
                        icon: "en"
                     },{
                        name: "French",
                        icon: "fr"
                     },{
                        name: "Hebrew",
                        icon: "he"
                     },{
                        name: "Russian",
                        icon: "ru"
                     },
                     // your locale goes to here
                     {
                        name: "German",
                        icon: "ge"
                     }
                  ]       
...                  
```

{% endcode %}

That's it, Now you can translate your app in your preferred language.
