# Adding a new language

{% hint style="success" %}
Applications required

* **Game Launcher PRO Edition**
* **Visual Studio Community (2022)**
  {% endhint %}

### Add a new language in the code

1. In **Visual Studio Solution Explorer**, open *<mark style="color:purple;">**Localization.cs**</mark>* under **GameLauncherCore** project

![](https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FGrDkiRTKbE7tkdfGvIJf%2Fimage.png?alt=media\&token=c9238e1b-b877-4734-8c8f-56b77fe6ca97)

{% hint style="info" %}
You can search for the ISOCode for your new language here: <https://www.andiamo.co.uk/resources/iso-language-codes/>
{% endhint %}

2. Duplicate the **SetLanguage\_EN\_US** function and change the name to your ISOCode

**Example:** *English (United Kingdom) | en-gb* \
We duplicated the ***SetLanguageEN\_US*** function and changed the name to ***SetLanguage\_EN\_GB***

<figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FZFHVaYnHfStNf9zQe3I4%2Fimage.png?alt=media&#x26;token=fd21276e-67a0-4110-babc-4b51f06b6044" alt=""><figcaption><p>Recently created SetLanguage function in <em>Localization.cs</em></p></figcaption></figure>

3. Now translate every string to your new language
4. In the **SetLanguage** function, add another **else if** using your language ISOCode.

<figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FY1P8QSTi8wD6IZPb2IuC%2Fimage.png?alt=media&#x26;token=2a7875ea-83f8-4a7e-8798-e86362b40fff" alt=""><figcaption><p>SetLanguage function in <em>Localization.cs</em></p></figcaption></figure>

5. In Views folder locate *<mark style="color:orange;">**SettingsWindow\.xaml.cs**</mark>* search for GetSelectedLanguageIndex and add your language ISOCods

<figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FaweIn4VXr2KssgsRk7UE%2Fimage.png?alt=media&#x26;token=43e3a6cb-8395-44f7-8ae9-69d599ba0d6b" alt=""><figcaption></figcaption></figure>

6. Duplicate the code from ***SetLanguage\_en\_US\_MouseDown*** function\
   And place a correct name to the function, and also change the string of the language.

<figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FI0vbGB6pjAhj91JrjdY1%2Fimage.png?alt=media&#x26;token=d5035ad8-da5b-41df-97ad-91fa38b5c42d" alt=""><figcaption><p>Placing new correct values</p></figcaption></figure>

7. In *<mark style="color:orange;">**SettingsWindow\.xaml**</mark>* search for **comboBoxUILanguage** element and search for the items and add a new one for your language.\
   Remember to change the PreviewMouseDown refering to the above function.

<figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FJxndG0uMEAEk95XoCis6%2Fimage.png?alt=media&#x26;token=c9304927-d87e-42fe-805f-f289033905ef" alt=""><figcaption></figcaption></figure>

**That's all!**

**Now run your Launcher and change the language to the new one!**
