> For the complete documentation index, see [llms.txt](https://fb-scripts.gitbook.io/fb-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fb-scripts.gitbook.io/fb-scripts/adding-a-new-language.md).

# Adding a New Language

{% stepper %}
{% step %}
Create a new file in `locales/` (e.g. `locales/sv.lua` for Swedish).
{% endstep %}

{% step %}
Copy the structure from `locales/en.lua` and translate all strings:

```lua
Locales = Locales or {}

Locales['sv'] = {
    tabs = {
        resume     = 'Återuppta',
        worldMap   = 'Världskarta',
        settings   = 'Inställningar',
        keyboard   = 'Tangentbord',
        commands   = 'Kommandon',
        faq        = 'FAQ',
        changelog  = 'Ändringslogg',
        disconnect = 'Koppla från',
        quitGame   = 'Avsluta spel',
    },
    sections = {
        commands  = 'Kommandon',
        faq       = 'FAQ',
        changelog = 'Ändringslogg',
    },
    modal = {
        yes           = 'Ja',
        no            = 'Nej',
        fallback      = 'Är du säker?',
        disconnectMsg = 'Är du säker på att du vill koppla från servern?',
        quitMsg       = 'Är du säker på att du vill avsluta spelet?',
    },
}
```

{% endstep %}

{% step %}
Add the file to `fxmanifest.lua` under `shared_scripts`:

```lua
'locales/sv.lua',
```

{% endstep %}

{% step %}
Set `Config.Language = 'sv'` in `config.lua`.
{% endstep %}
{% endstepper %}
