BBTranslator::getTranslation
Description
In BBj 9.0 and higher, this method returns a translation value based on specified criteria.
Syntax
Return Value |
Method |
string |
getTranslation(string key) |
string |
getTranslation(string key, string defaultValue) |
string |
getTranslation(string key, string defaultValue, boolean addIfNotFound) |
Parameters
Variable |
Description |
key |
Specifies the key to translate |
defaultValue |
Specifies the return value if the key is not found; by default the key will be returned when not found. |
addIfNotFound |
TRUE (1) if the key with the defaultValue should be added when not found. |
Return Values
If a translation is found with that passed key, then the translation value is returned. If not found and a default value was specified, the default value will be returned. If not found and a default value was not specified, the passed in key will be returned. When not found, the key and default can be optionally added to the translations.
Remarks
None.
Example
|