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 Localization -->
<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...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With