# How to add language

Files & folders needed:

> assets/texts/lang\_<mark style="color:green;">\*your\_code\*</mark>.json
>
> assets/options.json

Open <mark style="color:orange;">asstes/options.json</mark> file and find there languages property.

```json
"languages": {
    "ch": {
        "name": "lang.ch"
    },
    "en": {
        "name": "lang.en"
    },
    "ru": {
        "name": "lang.ru"
    },
    "ua": {
        "name": "lang.ua"
    }
}
```

Add there new object with your code and name:

```json
"pl": {
    "name": "lang.pl"
}
```

It will be looks like this:

```json
"languages": {
    "ch": {
        "name": "lang.ch"
    },
    "en": {
        "name": "lang.en"
    },
    "ru": {
        "name": "lang.ru"
    },
    "ua": {
        "name": "lang.ua"
    },
    "pl": {
        "name": "lang.pl"
    }
}
```

Save options file and create new file in <mark style="color:orange;">assets/text/lang\_</mark>[<mark style="color:green;">pl</mark>](#user-content-fn-1)[^1]<mark style="color:orange;">.json</mark>. Add there language name translation from options file.

```json
{
    "lang.pl": "Polska"
}
```

Run game and check options. Now you can translate game.

Additional description about language strings formatting bbcodes here:

{% content-ref url="/spaces/3nRkQI0xXhcgAZp5TWxQ/pages/vMWnFrM4y19z9jnmSons" %}
[lang\_\*.json](/assets/texts/lang_--json.md)
{% endcontent-ref %}

[^1]: Its your language code from options.json


---

# Agent Instructions: 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:

```
GET https://picnic-in-the-oblivion.gitbook.io/assets/modding/how-to-add-language.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
