Discussions

Web tier: servlets, JSP, Web frameworks: struts internalization - javascript messages?

  1. hi all, i like to use struts internalization concept in my applicatin as having property file for each language... so i do it for all the texts messages in JSP files, what about js script validation messages?? how can change those message also into the correspondance language or how to bring values from proepeerty file into js file or ? can one suggest how it could be done..?

    Threaded Messages (3)

  2. One way[ Go to top ]

    One way I did was... 1. javascript has each message with the language key postfix hello_en = "Good Morning" hello_de = "xxxxxx" 2. javascript in JSP (JSTL) call message in javasciprt with language key without postfix alert("") 3. Message Bundle entry of each languageg has it's own postfix message_en.properties js.hello=js.hello_en message_de.properties js.hello=js.hello_de
  3. Sorry, changed key[ Go to top ]

    One way I did was... 1. javascript has each message with the language key postfix (messge.js) js.hello_en = "Good Morning" js.hello_de = "xxxxxx" 2. javascript in JSP (JSTL) call message in javasciprt with language key without postfix (message.jsp) alert("") 3. Message Bundle entry of each languageg has it's own postfix message_en.properties js.hello=js.hello_en message_de.properties js.hello=js.hello_de
  4. Thx[ Go to top ]

    Thx for the help