Translating the mod

From Procedural Objects
Jump to navigation Jump to search

Procedural Objects includes an internationalization system to ease the use of the mod for non-English-speaking players. This article teaches how to make a new translation for the mod.

Creating a translation

  1. Find the following folder : C:\Program Files (x86)\Steam\steamapps\workshop\content\255710\1094334744
  2. Duplicate the file named lang_en.polocale and rename it with your language code (example for French : lang_fr.polocale)
  3. Open this new file using the default Windows notepad, or an other similar program such as Notepad++.
  4. On the first line, change the identifier to the one of your language. (example for French : identifier = fr)
  5. The "wiki_complete" line must be set to either true or false : set to true if the wiki is complete in this language, so that the Help buttons of PO link directly to the translated pages.
  6. On the second line, change the locale_name to your language's name in the given language. (example with French : locale_name = Français BUT NOT locale_name = French)

From here you will start the translation of the mod by replacing all the English texts.

Note : some translatable texts contain special markers.

  • {0} is used to be replaced by some other text. For instance in the case of the line : font_chars_available = Characters available for the {0} font, {0} will be replaced by the font name.
  • \n is used to mark a line break. Consider adapting the \n markers positions to make your text fit its location on the UI.

Testing a translation

If the vanilla game contains a translation in your language, the mod should automatically load your translation. Otherwise you will need to set it manually in the settings panel.

Submit a translation

You can submit your translation by contacting the creator of the mod. Please be advised that by the time you submit a translation, there might be an update in development and the creator will ask you to translate the new texts for the update before adding your translation in the mod's next update.