maxon.Resource¶
Description¶
Class that handles resources.
Inheritance diagram¶
Methods Signature¶
|
Finds for a given identifier (e.g. |
Retrieves an array of all available languages. |
|
Returns the language that is currently used. |
|
Returns the default language (normally english). |
|
|
Loads a string from the resource. |
|
Sets the current language. |
|
Writes the language preference file. |
Methods Definition¶
-
static
Resource.
FindLanguage
(identifier)¶ Finds for a given identifier (e.g. en-US) the language.
- Parameters
identifier (
maxon.Id
) – The language Id.- Return type
- Returns
The language.
-
static
Resource.
GetAllLanguages
()¶ Retrieves an array of all available languages.
- Return type
- Returns
Array with all languages on success.
-
static
Resource.
GetCurrentLanguage
()¶ Returns the language that is currently used.
- Return type
- Returns
The language.
-
static
Resource.
GetDefaultLanguage
()¶ Returns the default language (normally english).
- Return type
- Returns
The language.
-
static
Resource.
LoadResourceString
(scope, keyValue)¶ Loads a string from the resource.
Other than the member of LanguageRef this routine tries to load it from the current language first and -if that fails- from the default language.
- Parameters
scope (
maxon.Id
) – The resource scope of a resource symbol.keyValue (
maxon.InternedId
) – The value of a resource symbol.
- Return type
- Returns
String.
-
static
Resource.
SetCurrentLanguage
(language)¶ Sets the current language.
- Return type
- Returns
The language.
-
static
Resource.
WriteLanguagePrf
(language)¶ Writes the language preference file.
- Parameters
language (
maxon.LanguageRef
) – The language.