• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

J2EE Internationalization

 
Arockia Raj
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working for project where we need to internalize the j2EE application. We are not having any
Locale specific java classes. We need to internalize only JSP labels and JavaScript alert messages.
We finalized with keeping all the hard coding labels in a property file and retrieve the contents using java Resource Bundle Object. This I am seeing as a standard implementation across the entire projects.
But out project is for Chile where the language has to be of in Spanish and the application
Will be deployed in Chile and the users of the application are only from Chile i.e. Spanish users.
After seeing the code for resource bundle, it seems the labels will be fetched from property files
at runtime based on the locale object.
But in my case my locale is fixed and this is not runtime characteristics. I need this to happen at
Compile time since the locale is fixed .I thought of implementing this by introducing
pre-Compiling stage(through custom implementation) for jsp where the resource bundle entries are fetched and replaced for JSP labels before compiling the JSP.
Kindly share your valuable ideas regarding this.

regards
A.ARaj
 
Stefan Evans
Bartender
Pie
Posts: 1669
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could do this, but do you really need to?
Is there a problem having all the translations done at runtime?
Premature optimization is the root of all evil.
 
Arockia Raj
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

Since we are spending much effort on response time improvement,i thought of taking care at the initial stage itself.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic