Loc
classLocalization data entry
Functions
Loc.new(key, table)
Create new Loc object
| key | string | Localization key |
| table | string | Localization table name |
returns Loc
Loc.text(key, table, value)
Create new Loc object substituting a ready text into the line
| key | string | Localization key |
| table | string | Localization table name |
| value | string | Text put in place of {0} |
returns Loc
Loc.get(key, table)
Resolve key value to localized string
| key | string | Localization key |
| table | string | Localization table name |
returns string
Loc.format(key, table, args)
Localized line with {0}, {1}... filled in order and its tokens left for ui.RichText
| key | string | Localization key |
| table | string | Localization table name |
| args | any[] | Values put in place of {0}, {1}... |
returns string
Loc.gui_number(value)
Get number as string for GUI (3000 -> 3.0k)
| value | number | Number to format |
returns string
Loc:raw()
Localized string with its tokens such as {item:Name} left in, for ui.RichText to turn into links
returns string
Used by
- LogicExportOption.label field
- LogicExportOption.tooltip field
- LogicImportOption.label field
- LogicImportOption.tooltip field
- QuestObjective.label field
- StaticAchievement.label field
- StaticAchievement.description field
- StaticChapter.label field
- StaticItem.label field
- StaticItem.description_parts field
- StaticItemPanel.label field
- StaticItemPanel.description_parts field
- StaticQuest.label field
- StaticQuest.description_parts field
- StaticQuest.set_objective_label param
- StaticResearch.label field
- StaticResearch.description_parts field
- StaticTip.label field
- StaticTip.description_parts field