Skip to content

Localization

Noamancy edited this page Mar 30, 2026 · 15 revisions

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>.json
  • lang/<your-language>.json

These two files serve different purposes.


Where Localized Content Lives

data/i18n/<your-language>.json

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.

lang/<your-language>.json

This file contains UI strings and formatting patterns.

This includes things like:

  • Buttons
  • Labels
  • Notifications
  • Dialog text
  • Summary text
  • NamePatterns used to assemble generated item names

In short:

  • Use data/i18n for the words and localized data
  • Use lang for the interface text and formatting rules

Mechanics vs. Language

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

Equipment names are localized by type and id.

Example:

{
  "equipment": {
    "weapon": {
      "staff": "Staff",
      "tome": "Tome"
    },
    "armor": {
      "silk-shirt": "Shirt"
    }
  }
}

Clone this wiki locally