locked
Localizing a web site using meta:resourceKey... RRS feed

  • Question

  • User230295226 posted

    Hello,

    I have built a custom ResourceProvider to look up resources in a db.  That code works fine as it pulls the correct resources if I call HttpContext.GetGlobalResourceObject and also if I setup a control's property to <%$ Resources: ClassName, ResourceKey %> but if I set a control to use meta:resourceKey="ResourceKey" the code to retrieve the resource is never called.  Do I need to configure something to turn that on?
     

    Friday, December 15, 2006 12:56 PM

Answers

  • User1347187933 posted

    Hi,

    1. meta:resourceKey="ResourceKey" will retrieve resource from App_LocalResources directory,

    moreover, it will retrive the key as: "ResourceKey.Property", e.g.

    <asp:Label ID="lab1" runat="server" Text="test1" meta:resourcekey="labHelloLocal1" ></asp:Label>
    the key should be labHelloLocal1.Text,
     
    2. It also depends on how you implement your local resource provider.
     

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 2, 2007 5:38 AM