View Full Version : multilanguage in javascript
mdissel
2 Dec 2006, 5:48 AM
My current application needs support for multi language . I like to know how other people are dealing with multiple languages and javascript. At the server-side I'm using asp.net
Thanks
Marco
Animal
2 Dec 2006, 5:58 AM
We're using Java which has Locale support, and ResourceBundles which can be selected based on language.
I'm planning to export the correct ResourceBundle to the browser using a servlet which accesses the correct Locale from the browser setting (The servlet engine puts the info in the Request object for you). It will then convert the Properties into an associative array:
[ keyvalue: textvalue...]
I plan on having a javascript function which just evals the output from the servlet, and have a getText() function use that. Or I could just access the servlet's URL in a <script> tag. It depends how fast it ends up being.
Should work. I'm hoping...
christa
12 Oct 2007, 4:56 AM
Hey Animal,
I'm trying to find the easiest way to support multiple languages too...
So did your idea work?
I'm working with Java too, but I'm using dwr and dwrproxy do you think I will have trouble
passing the ResourceBundle back to Ext?
Thank you in advance.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.