Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing i18n properties from javascript

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

This should be an easy question:

How can I access the i18n properties from within javascript?
I've tried to google it, but couldnt find much useful. Closest i came was:
var text = "%{getText('i18n.properties.xxx')}";
but that didnt work..

any ideas?
 
Jose Daquila
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!!

alert("<bean:message key="msg.gral.errorKey"/>");

That is one way. It works!


 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. 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!