> For the complete documentation index, see [llms.txt](https://hane-mod-studio.gitbook.io/hane-mod-studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hane-mod-studio.gitbook.io/hane-mod-studio/hane-scripts/hane-gps/localization.md).

# Localization

Hane GPS includes a locale system with Turkish and English translations.

***

### Setting the Language

In `config.lua`:

```lua
Config.Language = 'en' -- 'en' for English, 'tr' for Turkish
```

***

### Locale Keys

| Key                | English Default                                |
| ------------------ | ---------------------------------------------- |
| `welcome_title`    | GPS SYSTEM                                     |
| `welcome_subtitle` | Location tracking system active                |
| `continue_button`  | Continue                                       |
| `gps_on`           | GPS On                                         |
| `gps_off`          | GPS Off                                        |
| `status_active`    | ACTIVE                                         |
| `status_inactive`  | INACTIVE                                       |
| `cooldown_message` | Please wait...                                 |
| `no_permission`    | You do not have permission to use this device! |
| `own_marker`       | You                                            |

***

### Adding a New Language

1. Create a new file in `locales/`, e.g., `locales/de.lua`.
2. Copy the structure from `locales/en.lua`:

```lua
Locales = Locales or {}

Locales['de'] = {
    ['welcome_title'] = 'GPS-SYSTEM',
    ['welcome_subtitle'] = 'Standortverfolgung aktiv',
    ['continue_button'] = 'Weiter',
    ['gps_on'] = 'GPS Ein',
    ['gps_off'] = 'GPS Aus',
    ['status_active'] = 'AKTIV',
    ['status_inactive'] = 'INAKTIV',
    ['cooldown_message'] = 'Bitte warten...',
    ['no_permission'] = 'Sie haben keine Berechtigung!',
    ['own_marker'] = 'Sie',
}
```

3. Set `Config.Language = 'de'` in `config.lua`.

> The locale system supports the `L(key)` function for accessing translations throughout the codebase.
