I18n
Purpose¶
A utility to manage i18n.
Note
The default locale is EN
Methods¶
Binding name: p6.i18n
Method: String getText(Map texts)
Reads the locale
pipeline entry and searches for the corresponding text in the map.
If no entry is found, or the pipeline variable is empty, the default locale is used.
Method: String getText(Map texts, String locale)
Returns the corresponding text in the map matching the given locale. If no entry is found, the default locale is used.
Example¶
def label = [
EN: "English",
FR: "French"
]
println p6.i18n.getText(label)
println p6.i18n.getText(label, "FR")