# Localization

### Introduction to Localization

Localization is the process of adapting a game for different regions and languages, including text translation, interface adjustments, and other changes to ensure a comfortable user experience. In the Gem RTS engine, localization is performed through `.lng` files, which store texts and settings for different languages.&#x20;

{% hint style="info" %}
Localization files are SDL files, and all [syntax rules for SDL files](/foundational-knowledge/basic-knowledge-about-configuration-files.md) apply to them.
{% endhint %}

## Structure of Localization Files

Localization materials (texts and voice-over files) are located in the root directory of the `main` package in folders named `.<lang>`, where `<lang>` is the language code (for example, the folder named `.en` contains English localization materials).

In the `main\.en\interface\text\` folder, the following files and directories are located

<table><thead><tr><th width="240">File Name</th><th>Purpose</th></tr></thead><tbody><tr><td><strong>desc</strong> (folder)</td><td>Contains files with descriptions of various game elements</td></tr><tr><td><strong>info_short</strong> (folder)</td><td>Includes short informational messages</td></tr><tr><td><strong>mission</strong> (folder)</td><td>Contains mission texts</td></tr><tr><td><strong>#damage_report.lng</strong></td><td>Localization file for damage reports</td></tr><tr><td><strong>#hud2+.lng</strong></td><td>Localization for HUD interface elements</td></tr><tr><td><strong>#ingame+.lng</strong></td><td>Includes text elements displayed during the game</td></tr><tr><td><strong>commander.lng</strong></td><td>Localization for commanders</td></tr><tr><td><strong>desc.lng</strong></td><td>Descriptions for various game elements</td></tr><tr><td><strong>difficulty.lng</strong></td><td>Texts related to difficulty levels</td></tr><tr><td><strong>info.lng</strong></td><td>General informational localization</td></tr><tr><td><strong>interactive_hints.lng</strong></td><td>Interactive hints</td></tr><tr><td><strong>loading_tips.lng</strong></td><td>Tips displayed during game loading</td></tr><tr><td><strong>mp+.lng</strong></td><td>Localization for multiplayer modes</td></tr><tr><td><strong>options+.lng</strong></td><td>Game settings and options</td></tr><tr><td><strong>side.lng</strong></td><td>Localization for factions</td></tr><tr><td><strong>unit.lng</strong></td><td>Texts related to units</td></tr></tbody></table>

{% hint style="info" %}
Files with a `+` in their name are appended in the order of package connection to the contents of similarly named files from the main resource localization folder. To find the required files, search for the name without the `+`
{% endhint %}

{% hint style="warning" %}
It is important to maintain [the structure of folders and file](/foundational-knowledge/game-resource-architecture/package-file-structure.md)s to ensure the proper functioning of localization in the game. \
All localization files must be placed in the appropriate directories and contain correct texts for display in the game.
{% endhint %}

***

#### More about localization

<table data-card-size="large" data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><a href="/pages/plHNii8tXH9QBOFffEZd">/pages/plHNii8tXH9QBOFffEZd</a></td><td>Using variable strings in localization files for hotkeys and control buttons in the game to ensure proper localization regardless of user settings</td><td><a href="/files/ueYOF7YCEEu954WYabzW">/files/ueYOF7YCEEu954WYabzW</a></td></tr><tr><td><a href="/pages/7MGIUVkkRf5mlHCmyecq">/pages/7MGIUVkkRf5mlHCmyecq</a></td><td>Step-by-step guide to adding localization texts for a new language in the game. Describes the process of adding fonts, configuration files, and localization files to ensure full support for the new language in the game.</td><td><a href="/files/ueYOF7YCEEu954WYabzW">/files/ueYOF7YCEEu954WYabzW</a></td></tr></tbody></table>


---

# 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://docs.bestway.com.ua/localization.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.
