Aleksei Valikov wrote:
I've MyFaces/Facelets app, most stuff is thoroughly i18nalized. I've got resource bundles, formats and so on. However, I'm missing a good concept for authored blocks of i18nalized information.

Say, I'd like to have an intro page which describes more or less what users can do with the application. This is probably a multi-paragraph richt (HTML) text. I'd also like to add some command links or buttons ("Click >here< if you'd like to search for data.").

This can hardly be implemented with resource bundle-delivered messages. They don't allow that rich formatting or using components.

There's no problem with having HTML formatting in messages in resource
bundles, as long as you deliver them with <h:outputText escape='false'...>
(even in facelets) so that the markup is preserved. It's perfectly
reasonable to have hyperlinks in there. The problem really comes when
you want to have JSF navigation on the links. Suddenly, for a block
of text with two links in, you have to have five resources in your
bundle (first text, link text, middle text, link text, end text). I
agree that it's messy.

...
Alternatively, block could be saved in sub-directories and <in:block name="myBlock.xhtml"/> automatically choses between en/myBlock.xhtml or de/myBlock.xhtml according to the user locale preferences.

Interesting idea! If you go down that route and write some code, why
not consider donating it to facelets. ISTM it would fit in very well
with the facelets UI tags which choose sections of UI to include in a
page.

Jon
--
.....................................................................
          Dr Jonathan Harley   .
                               .   Email: [EMAIL PROTECTED]
           Zac Parkplatz Ltd   .   Office Telephone: 024 7633 1375
           www.parkplatz.net   .   Mobile: 079 4116 0423

Reply via email to