NareshK
NareshK

Reputation: 43

Accessing resource file from JS file in c#.net

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

Answers (1)

Martijn B
Martijn B

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

Related Questions