maxon.Resource

Description

Class that handles resources.

Inheritance diagram

Inheritance

Methods Signature

FindLanguage(identifier)

Finds for a given identifier (e.g.

GetAllLanguages()

Retrieves an array of all available languages.

GetCurrentLanguage()

Returns the default language (normally english).

GetDefaultLanguage()

Returns the default language (normally english).

LoadResourceString(scope, keyValue)

Loads a string from the resource.

SetCurrentLanguage(language)

Sets the current language.

WriteLanguagePrf(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

maxon.LanguageRef

Returns

The language.

static Resource.GetAllLanguages()

Retrieves an array of all available languages.

Return type

maxon.BaseArray [maxon.LanguageRef]

Returns

Array with all languages on success.

static Resource.GetCurrentLanguage()

Returns the default language (normally english).

Return type

maxon.LanguageRef

Returns

The language.

static Resource.GetDefaultLanguage()

Returns the default language (normally english).

Return type

maxon.LanguageRef

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

maxon.String

Returns

String.

static Resource.SetCurrentLanguage(language)

Sets the current language.

Return type

maxon.LanguageRef

Returns

The language.

static Resource.WriteLanguagePrf(language)

Writes the language preference file.

Parameters

language (maxon.LanguageRef) – The language.