public class LanguageLocale
extends java.lang.Object
Using an entry on the page such as ${lang:key} you can retrieve the language value for that key.
The replacement pattern is "lang:key:resouce:language:country:variant"
where:
Example:
${lang:application.title} - Will use the default language properties file and get the value for application.title
${lang:application.title:jms_services} - Will use the language properties file jms_services and get the value for application.title
A default language file is setup for the key default_locale_file. Usually this is configured in the web.properties file loaded by the spring configuration.
| Constructor and Description |
|---|
LanguageLocale() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getLang(IExecContext execContext,
java.lang.String replacementPattern)
Get a value for key from a language (locale) file.
|
public java.lang.Object getLang(IExecContext execContext, java.lang.String replacementPattern)
The replacementPattern format is "lang:key:resouce:language:country:variant"
or "lang:key" uses the default resource file and the default locale
or "lang:key:resource" uses the resource file and the default locale
or "lang:key::language" uses the default resource file and the language locale
replacementPattern - - the replacement pattern that was entered within the StrSubstitution