Reputation: 43
I need to access the resource file keys from a js file, Is this possible or not?
For example if I want to set a popup message based on some conditions applied in .js file and want to get the text from a resource file according to the language then how can i achieve this?
Upvotes: 1
Views: 870
Reputation: 4075
The are a few common approaches on howto deal with localization in your client side scripts. One would be creating a standalone localized javascript file for every language and culture. But this would not fit your requirement of using .net resource files. I find this solution very elegant and does precisely want you want.
Upvotes: 2