Link to home
Start Free TrialLog in
Avatar of dkim18
dkim18

asked on

Accessing org.apache.struts.Globals.LOCALE_KEY in javascript func

Hi Experts,

I am wondering if there is a way to access org.apache.struts.Globals.LOCALE_KEY from javascript func.

I am working on web app(Struts) with English and Chinese version. There are simple javascript popup error messages and I want to change language depends on locale.

Are there better ways to deal with something like this?

thanks,
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Write the locale value into the page from the server side so the script can access it. JavaScript runs on the client.
Avatar of dkim18
dkim18

ASKER

how do I write local value from the sever side???
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial