roResourceManager
The roResourceManager object is used to manage strings in multiple languages.
Object creation: The roResourceManager object is created with a single filename parameter that specifies the name of the file that contains all of the localized resource strings required by the user. This file must be in UTF-8 format.
CreateObject("roResourceManager", filename As String)
ifResourceManager
SetLanguage(language_identifier As String) As Boolean
Instructs the roResourceManager object to use the specified language. False is returned if there are no resources associated with the specified language.
GetResource(resource_identifier As String) As String
Returns the resource string in the current language for a given resource identifier.
GetFailureReason() As String
Yields additional useful information if a function return indicates an error.
GetLanguage() As String
Usage
At present, roResourceManager is primarily used for localizing the roClockWidget. The resource file passed in during creation has the following format for each string entry:
[RESOURCE_IDENTIFIER_NAME_GOES_HERE]
eng "Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec"
ger "Jan|Feb|Mär|Apr|Mai|Jun|Jul|Aug|Sep|Okt|Nov|Dez"
spa "Ene|Feb|Mar|Abr|May|Jun|Jul|Ago|Sep|Oct|Nov|Dic"
fre "Jan|Fév|Mar|Avr|Mai|Jun|Jul|Aou|Sep|Oct|Nov|Déc"
ita "Gen|Feb|Mar|Apr|Mag|Giu|Lug|Ago|Set|Ott|Nov|Dic"
dut "Jan|Feb|Mar|Apr|Mei|Jun|Jul|Aug|Sep|Okt|Nov|Dec"
swe "Jan|Feb|Mar|Apr|Maj|Jun|Jul|Aug|Sep|Okt|Nov|Dec"
The name in square brackets is the resource identifier. Each line after it is a language identifier followed by the resource string. Multiple roResourceManager objects can be created. A default "resources.txt" file, which contains a range of internationalization values for the clock widget, is available on this page.
Â
Â