Click here to Skip to main content
15,881,413 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI,


For now am using hidden fields to show the alert text in javascript,but is there any way to get the values from resource files and show on alert without using hidden fields which should support globalization & localization concept


Thanks
Posted

1 solution

Sort of, but resource files reside on the server and therefore would still have to call into the server.

If you want to alert() a localized value you either need to store it in hidden field or cookie or call a webservice to get the value. Calling webservice is easy using jQuery's .ajax().
 
Share this answer
 
Comments
Member 10226004 26-Mar-15 9:47am    
can I have any example calling jquery ajax function especially for localization...
ZurdoDev 26-Mar-15 9:50am    
There is nothing unique about the call for localization.

Use jquery.ajax() (tons of examples online.) Pass in to your webservice the key you want translated and then return the translated value.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900