"Accept-Language"
attribute (set by the language options in the browser) and
supported locales configured by element in
faces-config.xml
.
faces-config.xml
.
f:view tag
, for example
<f:view locale="en_US">
.
faces-config.xml
within the element.
<application> <locale-config> <default-locale>en_US</default-locale> <supported-locale>en_US</supported-locale> </locale-config> ... </application>
<f:view locale="...">
has the higher priority during locale determination.
ResourceBundle
in JViews web applications
ResourceBundle
in a convenient way.
messages.properties
file and put the file in the same folder as the Java™ class.
ClassName.key=value
format in the
messages.properties
file. For example:
FrameworkBean.CustomImapGeneratorOn=Custom imap generator called on {0} FrameworkBean.onImageMap=on image map ...
messages.properties
file should be put in the same package as the class
FrameworkBean
.
ResourceBundle
ResourceBundle
, which does not require the user to hard code resource bundle
paths and is also a convenient way to retrieve different
locales when necessary.
ilog.views.util.IlvResourceUtil.getCurrentLocaleString(Class
clazz, String subkey)
to retrieve the message property value. For example:
ilog.views.util.IlvResourceUtil.getCurrentLocaleString(FrameworkBean.class, "onImageMap");
ilog.views.util.IlvResourceUtil.getServerLocaleString(Class
clazz, String subkey)
to retrieve the message property value. For example:
ilog.views.util.IlvResourceUtil.getServerLocaleString(FrameworkBean.class, "CustomImapGeneratorOn")