Does Facelets have any features for neater or more readable internationalised user interface text labels that what you can otherwise do using JSF?
For example, with plain JSF, using h:outputFormat is a very verbose way to interpolate variables in messages.
Clarification: I know that I can add a message file entry that looks like:
label.widget.count = You have a total of {0} widgets.
and display this (if I'm using Seam) with:
<h:outputFormat value="#{messages['label.widget.count']}">
<f:param value="#{widgetCount}"/>
</h:outputFormat>
but that's a lot of clutter to output one sentence - just the sort of thing that gives JSF a bad name.
Since you're using Seam, you can use EL in the messages file.
Property:
label.widget.count = You have a total of #{widgetCount} widgets.
XHTML:
<h:outputFormat value="#{messages['label.widget.count']}" />
This still uses outputFormat, but is less verbose.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With