Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Internationalization in javascript

 
rajani arjun
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i want to implement internationalization for javascript alert messages.

Thanks

Rajani
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's how I'd do it:

 
rajani arjun
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you i got it
 
Latha Sree
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i am also facing same problem.

I placed alert('<bean:message key="my.message.key" />'); in java script but,
how should i match <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> in javascript as i did in jsp

I am facing script error

Please reply

Thanks
Madhavi
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Custom tags and taglib directives will only work in files processed as JSP. If it's in a JavaScript file they won't work unless you're running your JavaScript files through the JSP compiler.
 
How do they get the deer to cross at the signs? Or to read this tiny ad?
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!