开发者

Localization of javascripts and jquery alerts

Is it possible开发者_StackOverflow to localize the javascript and jquery in asp.net (.net 4)?

Is there any proper examples with c#?


http://weblogs.asp.net/scottgu/archive/2010/06/10/jquery-globalization-plugin-from-microsoft.aspx

This site provides a demo application of globalization of jquery in .net


I usually create one localization script per language for a plugin. The script contains variables with all strings that the plugin use. Other scripts let you define all text strings in the plugin options.

I then use ASP.NET to define which language (since the user might not want the language reported by the browser).

In your master page:

<script type="text/javascript" src="/Scripts/jquery.yourplugin.resources.<%= userLanguage %>.js"></script>
<script type="text/javascript" src="/Scripts/jquery.yourplugin.js"></script>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜