Localization

From Of Life and Land Wiki
Jump to navigation Jump to search

Of Life and Land uses the tools from Godot to localize the game. You can find the basics here and the list of locales here.

To translate the text we use .csv files where we follow RFC4180 except we use a ; instead of a , to mark an end of a cell.


Files

All the files to localize are stored in /Translation/*.csv. To add a new language you can add a column to the file and fill out the cells (e.g. with LibreOffice)


Details:

  • Non breaking spaces are supported.
  • New lines and semicolons in the text are supported. The text needs to be enclosed in double-quotes "TEXT;TEXT" in this case.
Example: "Has many
lines of text"
  • If quotation marks are needed in the text, use double quotes "" to get a single quote ". The text needs to be embedded in quotes like it has a new line.
Example: "My ""quote"" test" will get My "quote" test
  • Column "aa" is used for comments and the context.
  • Column "aa_DJ" states the character limit. It is only a number.
  • Some text uses BBCode. [b][/b] for bold, [i][/i] for italic, [color=#ffe4be][/color] for a colour
Reference: https://docs.godotengine.org/en/3.5/tutorials/ui/bbcode_in_richtextlabel.html#reference
  • Some labels use a placeholder for a word or a number. We use the .net String format {0}, {1}, ...{x}
Example: "Damage +{0}%" can get "Damage +12%"
Reference: https://learn.microsoft.com/en-us/dotnet/api/system.string.format