Skip to content

Localization

Noamancy edited this page Mar 30, 2026 · 15 revisions

Localization

Lookfar’s localization system is designed to separate data sets from ui elements. 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 work with 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

Data Organization

Lookfar now handles raw rule values the code needs in the equipment.json and qualities.json. Additional data added to the module, will be found here - and will not need to be localized.

Our dataLoader.js now reads localized equipment names, qualities, keywords, and related generated data from data/i18n/<lang>.json. This is so translators are no longer expected to edit mechanic files that aren't hard-coded into the scripts themselves, and can focus strictly on 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