aspose file tools
The moose likes JSF and the fly likes Whole page localization - is this possible in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Whole page localization - is this possible in JSF" Watch "Whole page localization - is this possible in JSF" New topic
Author

Whole page localization - is this possible in JSF

Alexander Kolesnikov
author
Ranch Hand

Joined: Feb 26, 2005
Posts: 99
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?


Alexander Kolesnikov<br />Java Web Developer<br />SCJP 1.4, SCWCD 1.4, SCBCD 1.3<br /><a href="http://sundraw.ws" target="_blank" rel="nofollow">Tapestry 5: Building Web Applications</a><br /><a href="http://sundraw.ws/batik.jsp" target="_blank" rel="nofollow">Java Drawing With Apache Batik</a>
Daniel Rhoades
Ranch Hand

Joined: Jun 30, 2004
Posts: 186
The message bundle (properties file) supports language post-pending like you described in Tapestry.


Drinking more tea is the key...
Eddy Lee Sin Ti
Ranch Hand

Joined: Oct 06, 2005
Posts: 135

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.


SCJP, SCWCD, SCJWS, IBM 700,IBM 701, IBM 704, IBM 705, CA Clarity Technical<br /> <br /><a href="http://eddyleesinti.blogspot.com" target="_blank" rel="nofollow">http://eddyleesinti.blogspot.com</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Whole page localization - is this possible in JSF
 
Similar Threads
JSPs and tapestry competing technologies?
Different types of frameworks
Where does Tapestry shine over JSF?
Need suggestion regarding java framework for web portal development
future of JSF