Roresourcemanager (hd2000 only) – BrightSign HD2000 Object Reference Manual User Manual

Page 45

Advertising
background image

roResourceManager (HD2000 only)

The roResourceManager is used for managing strings in multiple languages.

Object creation:
 CreateObject("roResourceManager", rotSTRING filename)

o

filename = 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.


The interface includes:
 rotBOOL SetLanguage(rotSTRING language_identifier)

o

Instructs the roResourceManager object to use the specified language. False is returned if

there are no resources associated with the specified language.

 rotSTRING GetResource(rotSTRING resource_identifier)

o

Returns the resource string in the current language for a given resource identifier.


At present, the main use for the roResourceManager is for localizing the roClockWidget.

The resource file passed in on 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 the square brackets is the resource identifier. Each line after it is a language identifier followed
by the resource string. Multiple roResourceManagers can be created.

A default “resources.txt” file is available from Roku’s website.

45

Advertising
This manual is related to the following products: