开发者

Globalization of HTML controls

How can i implement globalization in html control

like for ex:

for asp.net control i can do

  <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" meta:resourcekey="Button1" />
        <!-- Explicit Lo开发者_如何转开发calization -->
        <asp:Button ID="Button2" runat="server" onclick="Button1_Click" Text = "<%$ Resources:Sample_aspx, Button1Caption %>"/>

how do i achieve this in a html control like a label or html anchor tag


You could probably do it a number of ways...The first one would be to add the runat="server" control which turns any regular control into a server control

or perhaps use the localization control. Here's a sample from the MSDN article on localization:

<h1>
   <asp:localize runat="server" 
       Text="<%$ Resources:WebResources, WelcomeMessage %>" />
</h1>

This would grab the value from your resource file and put in in a h1 tag which is just regular html

That link also has some other pretty useful information to your problem...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜