• Post Reply Bookmark Topic Watch Topic
  • New Topic

Whole page localization - is this possible in JSF

 
Alexander Kolesnikov
author
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying i18n using different frameworks (this is a part of my university work). Did that with Tapestry and Struts, now came to JSF. It seems to have everything the other two frameworks have, perhaps even more, but one thing seem to be missing - or I just couldn't find how to do that.

Say, I have a page which consists just from text, plenty of it. Like 'terms and conditions' or some legal stuff. It would be ridiculous to put all this text into a properties file and then localize the page paragraph by paragraph.

In Tapestry I can just provide two templates for the page, one, say, terms.html for the default locale, and another one terms_de.html for the German locale. And framework will automatically choose which of them to use when rendering the page depending on the preferred locale.

Does anything like this exist in JSF?
 
Daniel Rhoades
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The message bundle (properties file) supports language post-pending like you described in Tapestry.
 
Eddy Lee Sin Ti
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In Tapestry I can just provide two templates for the page, one, say, terms.html for the default locale, and another one terms_de.html for the German locale. And framework will automatically choose which of them to use when rendering the page depending on the preferred locale.

Does anything like this exist in JSF?


So far I know that JSF supports only message bundle based localization in the standard specification. Maybe you can create your tag that include different page based on locale.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!