I wasn't sure if I should post this question to JSP list but
anyways, here goes.
I'm trying to implement internationalization and am thinking
of doing this the following way. I would appreciate
comments as what can be improved and/or how other people do
this.
When checking for existing session or creating a new one get
appropriate bundle. Locale would be determined for each
user either from user session, preferences in database or a
cookie. Then put that bundle into session object for JSP to
use. When user decides to change his/her preffered language
replace that value from session with a new one.
Issues:
1. Is it too expensive to load a bundle on creation of new
session and have them in each session? It seems so.
2. Should all the bundles be loaded into ServletContext
instead? How would it work? Wouldn't you have to recompile
the servlet when adding support for new language?
3. Should servlets not even care for this and let JSPs load
bundles based on Locale of the given session?
4. ResourceBundle tries to load a class with the Locale
name but if it's not there it tries to find a .properties
file. What are the advantages/disadvantages of these two?
5. How do HTML designers work in this environment? Do they
work with JSP and wait for the pages to recompile each time
to see how it looks for different languages? Do they first
create a mock up in English and then have programmer create
the JSP and hope it looks OK in German?
I would appreciate comments on this. I apologize for slight
off-topickness(?).
dave.
--
David Mossakowski [EMAIL PROTECTED]
Programmer 212.310.7275
Instinet Corporation
"I don't sit idly by, I'm planning a big surprise"
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html