How to provide translations for items in a ASP.Net custom web control (.ascx)?

Posted by paul on Stack Overflow See other posts from Stack Overflow or by paul
Published on 2010-05-20T12:30:52Z Indexed on 2010/05/20 12:40 UTC
Read the original article Hit count: 225

Filed under:
|
|

How do I go about providing localised text for items in a custom web control? I had thought that I just need to add meta.resourcekey tags to the control items and then define and fill some resource files called mycontrol.ascx.[lang].resx but that doesn't seem to work.

e.g.

MyControl.ascx

<asp:Label ID="Label1" meta:resourcekey="Label1" runat="server" Text="Oops!"></asp:Label>

MyControl.ascx.de.resx

Label1.Text    Donner und Blitzen!

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about i18n