CorsixTH Lua Documentation

Strings Class

Layer which handles the loading of localised text.

Declared on: line 24 of Lua/strings.lua.

Method Index

Member Index

function Strings:Strings(app)

Parameters:

NameTypeDescription
app ? ?

Declared on: line 30 of Lua/strings.lua.

function Strings:_loadPrivate(language, env, ...)

Parameters:

NameTypeDescription
language ? ?
env ? ?
... ? ?

Declared on: line 329 of Lua/strings.lua.

function Strings:checkLanguageExists(language)

Checks the language we specify is known to the application.

Parameters:

NameTypeDescription
language string Language to check

Declared on: line 322 of Lua/strings.lua.

function Strings:getFont(language)

Get the Font() declaration of a language, if there was one.

Parameters:

NameTypeDescription
language ? ?

Declared on: line 290 of Lua/strings.lua.

function Strings:getLangCode(language)

Parameters:

NameTypeDescription
language ? ?

Declared on: line 301 of Lua/strings.lua.

function Strings:getLanguageNames(language)

Parameters:

NameTypeDescription
language ? ?

Declared on: line 296 of Lua/strings.lua.

function Strings:getLocalisedText(string, table)

Use local language text where possible.

Parameters:

NameTypeDescription
string string The default, likely English, text
table table A table of translated text in language code fields

Declared on: line 310 of Lua/strings.lua.

function Strings:isArabicNumerals(language)

Parameters:

NameTypeDescription
language ? ?

Declared on: line 306 of Lua/strings.lua.

function Strings:load(language, no_restriction, no_inheritance)

no_restriction disables errors on access to non-existent strings (for debug purposes) no_inheritance disables inheritance except original_strings (for debug purposes)

Parameters:

NameTypeDescription
language ? ?
no_restriction ? ?
no_inheritance ? ?

Declared on: line 166 of Lua/strings.lua.

function Strings:setupAdviserMessage(messages)

Parameters:

NameTypeDescription
messages ? ?

Declared on: line 345 of Lua/strings.lua.