| 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>
|
 |
 |
|
|
subject: Whole page localization - is this possible in JSF
|
|
|