You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by "Ian.Priest" <Ia...@opsera.com> on 2006/07/14 12:11:10 UTC

Internationalisation: Embedded HTML markup in Message Bundles?

The site I'm working on has quite a lot of largish static pages
containing help info, user guides etc. There's quite a lot of mark-up in
the pages, for example:
 
<h3>help section  1</h3>
<p>some useful info</p>
<p>some more useful info</p>
 
I need to make the content multi-language, and can think of a couple of
ways to go about it.
 
1. The obvious: use a message bundle. The problem I can see with this is
that (afaik) it's not possible to put html markup into a message bundle
and have it rendered on the page. It's generally treated as part of the
text and displayed by the browser instead of being used to format the
text. Hence even the tiny snippet above would require three entries in
the message bundle. With the pages I'm looking at the grand total of
entries in the message bundle would be into 4 figures!
 
2. Use the current locale to load files from a dynamic url, (I use
clayImport to pull them into my layout), so I'd have
/static_content/en/, /static_content/fr/, and then have an English,
French etc. copy of each html page.
 
Personally I lean towards the second solution, but was curious whether
there is some clever Clay-way of getting markup from a message bundle to
actually be used as markup by the browser?
 
Cheers,
Ian.