Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
27. Mar 2008, 01:17 CET | Link

Hello,

I have made some searchs but I didn't found any issues. I sure that I haven't got the good keywords and that the problem has been already posted. Sorry for that.

I would like to format text in the internationalized files (messages-en.properties etc...)

It's just to put some br /, italic or bold effects. If i put some HTML tags, they are just displayed as text.

Is it possible or should I split my sentences and apply a style in code ?

Sorry if my English is not perfect.

Thanks for your answers

Regards, Paul

3 Replies:
27. Mar 2008, 08:34 CET | Link

It works fine for me. How do you display the texts? Don't forget to disable escape:

<h:outputText value="#{messages['myText']}" escape="false"/>
27. Mar 2008, 09:22 CET | Link

disabling escape also works for me.

but you should keep this in mind:

  • the guys who translate your texts might not know about html and they sometimes mess up your html code: and that's sometimes difficult to find :(
  • if you ever plan to use a different gui (not html aware), you are probably better off using plain text messages
27. Mar 2008, 17:26 CET | Link

Shame on me....

I didn't use h:outputText tag...

It's working now .

Thanks so much.

To Martin, yes you're right, but it's just to format paragraph. I prefer formatting in each language instead of created several labels.

The day I display my text in a non-HTML client............ Hum, I will think that you was right !

Thanks all.