Localization of base game and mods

From Nebuchadnezzar Modding Wiki
Jump to navigation Jump to search

General localization vs mods localization

There are two types of data for localization.

General data

Data used in the game regardless used mods.

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

Mods data

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

General data

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

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.

Fonts

What to do when game's font does not support your localization language?

  • Localization def file for general string may contain special property font_def_override
    • It can contain name of fonts definition file.
    • Game then uses fonts from this file when the language is selected.
  • Look at Russian or Chinese language for example.