Loc

Loc

class

Localization 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:get()

Resolve Loc object to localized string

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