Locale System
Every word the screen says — menu labels, page titles, loading stages, the music player — comes from a locale file.
Built-In Locales
| File | Language |
|---|---|
locales/en.lua | English |
locales/tr.lua | Turkish |
Choosing the Language
lua
Config.lang = 'en'
Config.lang also tells the screen how to write capitals — the Turkish i becomes İ under 'tr' and I under 'en'.
Locale File Format
lua
Locales = Locales or {}
Locales['en'] = {
['menu.label'] = 'Menu',
['progress.map'] = 'Loading the map',
['gallery.count'] = '%s photos',
-- …
}
%s is filled in by the screen (a count, a name) — keep it where it belongs.
Adding a Language
- Copy
locales/en.luatolocales/de.lua - Change
Locales['en']at the top toLocales['de'] - Translate the values on the right, keep the keys on the left unchanged
- Set
Config.lang = 'de'
A new locale file is picked up automatically, and it stays editable after escrow.
