Localization of base game and mods

From Nebuchadnezzar Modding Wiki
Jump to navigation Jump to search

General localization vs mods localization[edit]

There are two types of data for localization.

General data[edit]

Data used in the game regardless used mods.

  • Example: main menu buttons, employees activies, amployees types, screen names etc.

Mods data[edit]

Data related to specific mod.

  • Example: mission description, building names, goods names etc.
  • Do not forget that all Nebuchadnezzar missions and game data are also in the mod, so all related localization are in the mod as well.

Localization files[edit]

General data[edit]

Localization files for general strings are located at [game installation folder]/data/locale/[language name].lua

  • Look at existing files to understand the file format.
  • Name of the file is the name of this language player can select in the game.
  • If you want to add new language, simply create valid localization file in this folder and that's all. Game will detect new language at next start.

Mods data[edit]

Localization files for mod strings are located at [mod data folder]/locale/[language name].lua

  • Look at existing files to understand the file format.
  • Name of the file must be same as the name of general localization file of the appropriate language.
    • It also means that if you want to create localization for mod data only in a language which has no general data localization file, you have to create this general localization file (even if it won't contains any data) for game be able to select this language.