struts internalization for javascript messages
Hi ALL,
I am doing an internalization to my struts application... i am using property files for each language (say for example, english, french.. etc,) ... i can get the labels, messages to the struts fields, other texts..
but how to interact the javascript messages?i don't know how to implement those messages for javascript...,
please advise me
Thanks
Logu
[413 byte] By [
loguKKa] at [2007-11-27 9:28:50]

# 1
The javascript message is just template text printed onto the page right?
So how is it different in concept from any other label?
You may need to escape the messages for javascript (quotes etc etc) but on the whole you can apply the same i18n principles as you do elsewhere.
ie
// instead of this
<script>
alert('You did a bad thing');
</script>
// something like this
<script>
alert('<fmt:message key="badThing"/>');
</script>
# 2
thanks it works...
how to set the property message for struts buttons... say for example,
<html:button property="button" styleClass="button" value="Save" onclick="formsubmit();" />
how to set the property message for this button.... ? i want to replace value=Save into my property message....
# 3
<html:button property="button" styleClass="button">
<bean:message bundle="bundleName" key="BTN_SAVE" />
</html:button>
have BTN_SAVE=Save in ur properties file.