I wrote an ASP.Net Program that use resource key to support multi language support
Now I want to tokenize this module to enable user give template to it.
for that I give tokens to user to drop it in module and I will replace it. for example if user type [lblsomething] in HTML I will replace it with
<span id="lblsomething"> something </span>
Now the problem is how can i use resource key with this span to support multi language just like what i have in ASP.Net <asp:label resourcekey="lblsomething"></asp:label>
Thanks a lot for any help you can provide
You neeed to add runat="server" to the control.
<span id="something" runat="server" meta:resourcekey="PressMeButtonResources"/>
Or alternatively, you can use literal control inside the span tag.
Strangely the solution Localization.GetString... by atabrizi doens't work for me.
This works in my case (example for birthday label + textbox in a form):
<label for="birthday">
<%=GetLocalResourceObject("form_Birthday.Text").ToString()%>
</label>
<input type="text" id="birthday" name="birthday" />
msdn: How to: Retrieve Resource Values Programmatically
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