Strings Class
Layer which handles the loading of localised text.
Method Index
- _loadPrivate(language, env, ...)
- checkLanguageExists(language)
- getFont(language)
- getLangCode(language)
- getLanguageNames(language)
- getLocalisedText(string, table)
- init()
- isArabicNumerals(language)
- load(language, no_restriction, no_inheritance)
- setupAdviserMessage(messages)
Member Index
- app
- chunk_to_font
- chunk_to_names
- language_chunks
- language_to_chunk
- language_to_lang_code
- languages
- languages_english
- languages_with_arabic_numerals
function Strings:Strings(app)
Parameters:
| Name | Type | Description |
|---|---|---|
| app | ? | ? |
Declared on: line 30 of Lua/strings.lua.
function Strings:_loadPrivate(language, env, ...)
Parameters:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| language | ? | ? |
Declared on: line 290 of Lua/strings.lua.
function Strings:getLangCode(language)
Parameters:
| Name | Type | Description |
|---|---|---|
| language | ? | ? |
Declared on: line 301 of Lua/strings.lua.
function Strings:getLanguageNames(language)
Parameters:
| Name | Type | Description |
|---|---|---|
| language | ? | ? |
Declared on: line 296 of Lua/strings.lua.
function Strings:getLocalisedText(string, table)
Use local language text where possible.
Parameters:
| Name | Type | Description |
|---|---|---|
| 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:init()
Declared on: line 38 of Lua/strings.lua.
function Strings:isArabicNumerals(language)
Parameters:
| Name | Type | Description |
|---|---|---|
| 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:
| Name | Type | Description |
|---|---|---|
| language | ? | ? |
| no_restriction | ? | ? |
| no_inheritance | ? | ? |
Declared on: line 166 of Lua/strings.lua.
function Strings:setupAdviserMessage(messages)
Parameters:
| Name | Type | Description |
|---|---|---|
| messages | ? | ? |
Declared on: line 345 of Lua/strings.lua.