BBTranslationBundle::addTranslation
Description
In BBj 9.00 and higher, this method adds a translation to the translation bundle.
Syntax
Return Value |
Method |
void |
addTranslation(string key, string value) |
void |
addTranslation(string key, HashMap values) |
void |
addTranslation(locale locale, string key, string value) |
Parameters
Variable |
Description |
key |
Specifies the key of the translation to add. |
locale |
Specifies the locale to add the translation; when not specified, the locale of origin is used. |
value |
Specifies the value of the translation to add. |
values |
Specifies a HashMap where the key is the Java locale and the value is the translation value. |
Return Value
None.
Remarks
When specifying a HashMap the keys and values should look like the following:
newTranslation! = new HashMap()
newTranslation!.put(new Locale("en"),"hello")
newTranslation!.put(new Locale("es"),"hola")
newTranslation!.put(new Locale("it"),"cioa")
newTranslation!.put(new Locale("fr"),"bonjour")
newTranslation!.put(new Locale("nl"),"hallo")
newTranslation!.put(new Locale("de"),"guten tag")
newTranslation!.put(new Locale("sv"),"god dag")
bundle!.addTranslation("hello",newTranslation!)
Example
|