LocalizationConfig ​
Inherits: Resource
The localization setup of the game: the language the text is written in (the source language), the other languages, and the choices about text the game may show. It is the file res://src/data/localization/localization_config.tres, made by the Localization tab of the editor. See Localization.
Properties ​
String | source_language | "en" |
Array[LocalizationLanguage] | languages | [] |
PackedStringArray | shown_fields | [] |
PackedStringArray | collections | [] |
PackedStringArray | interface_folders | [] |
PackedStringArray | ignored_words | [] |
String | fallback_language | "" |
Methods ​
LocalizationLanguage | get_language( code: String ) |
Array[String] | get_codes() |
Property descriptions ​
String source_language = "en" ​
The language the game's text is written in: the text in the editor. Nothing is looked up for it
Array[LocalizationLanguage] languages = [] ​
The languages the game can be played in besides the source language
PackedStringArray shown_fields = [] ​
The text of types that the game does not show today but may show (a quest line name, a trainer name): the fields to include in the tables, as "type.field" ("questline.display_name"). The Localization tab lists them
PackedStringArray collections = [] ​
The collections that have a table (the file tables/<collection>.tres): one per type of database resource that has text, and "toolkit" for the words of the toolkit's own interface
PackedStringArray interface_folders = [] ​
The folders with the scenes and scripts of the game's own interface that the generator reads for the words in them (the words of Labels and Buttons, and Localization.t("...") in code). The toolkit's own scenes are always read. Example: ["res://src/ui/"]
PackedStringArray ignored_words = [] ​
Words of the scenes that are not translated (a name the interface sets from code, a test text): the generator leaves them out
String fallback_language = "" ​
The language the game starts in when the player has not chosen one and the computer's language is not a language of the game (empty = the source language)
Method descriptions ​
LocalizationLanguage get_language( code: String ) ​
The language with this code, or null (the source language has no entry)
Array[String] get_codes() ​
The codes of all the languages: the source language first