I’d like to keep localized text in a formatted manner (Using the <resource-bundle> in JSF)
For example:
in english.txt:
welcome_msg = <p>Hello <b>Friend</b></p>
in spanish.txt:
welcome_msg = <p> Ola <b>Hombre</b> commo esta? </p>
(Just random examples)
If I just use <h:outputText value="#{text.welcome_msg}" /> I will simply get the meta tags in the web page.
How can I achieve this?
Thanks!
By default,
<h:outputText/>escapes the<,>, and&characters. Use theescapeattribute to disable this:Be aware that this is now a potential security hole, depending on the source of the text that you are outputting.
See also: http://download.oracle.com/javaee/6/javaserverfaces/2.0/docs/pdldocs/facelets/h/outputText.html