I haven't run into this problem yet, but perhaps it depends on where this sort of thing is used.
If the whole chunk of text shouldn't be wrapped then you might be able to use CSS to deal with that problem:


http://www.w3.org/TR/REC-CSS2/text.html#propdef-white-space

<span style="whitespace: nowrap;">text that shouldn't wrap goes here</span>

Then you don't have messy html in your properties, and have to deal with inserting unescaped fields. I think this is a bigger problem if there is a couple of words in a chunk of text where you don't want a break - in that case I'm not so sure what the best answer is.

Some people believe &nbsp; is dangerous :) http://www.trygve.com/doomsday.html



Joe Hertz wrote:

I have a number of property values that will be internationalized and need
non-breaking spaces between each word in them.

I could put &nbsp; into each space, but that

1) is going to confuse my native language translators who know nothing of
HTML. 2 words in english could be 3 in language-x).

2) would be wrong.

There doesn't appear to be any built in method of handling this with
bean:message or anything else, so I'm about to write a custom configuration
class for a separate Message Resource Bundle that will contain the
properties where I want spaces displayed as "&nbsp;"'s

I have a hard time believing no one else has run into this...so I ask the
following:

Do I need to do this? Is there a way of doing it without writing a custom
handler? or a better way of doing it? And if not, who wants to see the code
when it's done? :-)

-Joe



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Jason Lea



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to