Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | i18nText(baseDir, key, language) | Package | | Alias | | Pkg Usage | | |
Description
Excerpt |
---|
|
Returns the i18n text if the key can be resolved. Otherwise, the key itself will be returned. |
Returns the i18n text if the key can be resolved. Otherwise, the key itself will be returned.
Parameters
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
baseDir | String | Yes | The relative path to the properties files directory. The path is relative to cprime home. | key | String | Yes | Key for the i18ned message. | language | String | Yes | The language to use for the i18ned text. | |
Return Type
String
Example
If we have a directory called messages placed under the cprime home directory with the following properties files:
Code Block |
---|
runnerLog("UK: " + i18nText("messages", "com.mymessage.test.working", "en_UK"));
runnerLog("US: " + i18nText("messages", "com.mymessage.test.working", "en_US"));
runnerLog("US: " + i18nText("messages", "com.mymessage.test.working", "en"));
runnerLog("Test inexistent key: " + i18nText("message", "com.mymessage.test.inexistent.key", "en_US"));
runnerLog("fr_CH: " + i18nText("messages", "com.mymessage.test.working", "fr_CH"));
runnerLog("fr_FR: " + i18nText("messages", "com.mymessage.test.working", "fr_FR"));
// if the property file does not exists, the value will be returned from the default properties file if exists
runnerLog("Test inexistent property file: " + i18nText("messages", "com.mymessage.test.inexistent.property.file", "ro_RO")); |
Note |
---|
The properties files should match the folder name and had the properties extension. |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "jira_system_routine" and space = currentSpace ( ) |
---|
labels | array_routines |
---|
|