Repository navigation
Localization
Lookfar’s localization system is designed to separate mechanics from language. This makes translations cleaner, easier to maintain, and much more flexible for languages that do not map neatly to English word order.
When localizing Lookfar, you will usually work in two different files:
data/i18n/<your-language>.jsonlang/<your-language>.json
These two files serve different purposes.
This file contains localized data used by generated content.
This includes things like:
- Equipment names
- Quality names
- Quality descriptions
- Keyword lists
- Discovery effects and sources
- Other generated word pools
This file is used when the module needs localized words to build treasure names, quality labels, keyword prompts, and similar generated output.
This file contains UI strings and formatting patterns.
This includes things like:
- Buttons
- Labels
- Notifications
- Dialog text
- Summary text
-
NamePatternsused to assemble generated item names
In short:
- Use
data/i18nfor the words and localized data - Use
langfor the interface text and formatting rules
Lookfar now treats files like equipment.json and qualities.json as mechanical data files.
That means they store the IDs and raw rule values the code needs, while translated text is expected to live in the localization files. The loader reads localized equipment names, qualities, keywords, and related generated data from data/i18n/<lang>.json.
This is important because it means translators are no longer expected to edit mechanic files just to translate visible text.
Equipment names are localized by type and id.
Example:
{
"equipment": {
"weapon": {
"staff": "Staff",
"tome": "Tome"
},
"armor": {
"silk-shirt": "Shirt"
}
}
}