EL variable in JSF ResourceBundle

I read somewhere (I can't find it anymore) that I can use EL Expresions in a resource set and then use it unchanged in * .xhtml files.

some.text=#{someBean.stepsLeft} more

to switch the position of a variable in different languages. But in reality it will not work. I can use the Interpolator class to handle parsing or add some.text.before some.text.after and let one of them be empty. I would rather use it without the .interpolate () interpolator, if possible.

+5
source share
1 answer

JSF resourcebundles EL. MessageFormat API <h:outputFormat> <f:param>.

some.text = {0} more

<h:outputFormat value="#{i18n['some.text']}">
    <f:param value="#{someBean.stepsLeft}" />
</h:outputFormat>

number, , , 1000 1,000 1.000 .

some.text = {0,number} more

. MessageFormat.

+9

All Articles