locked
Localize a custom web control (embed resource files) RRS feed

  • Question

  • User1785863221 posted

    Hi,

    Im writting a CompositeControl and want to Localize some text values in the control.

    Is it possible to embed resx file in the control's assembly?

    How can I than retreive the embedded resource values?

    Thanks,

    Tal88 

    Thursday, December 6, 2007 9:09 AM

Answers

  • User-503940700 posted

    Hi,

    You can easily embed resources files in the custom control DLL as shown in this article (check the part titled: Embedding Resources in a DLL Project):

    http://msdn.microsoft.com/msdnmag/issues/06/08/BasicInstincts/

    Hope this helps,

    Vivek

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 10, 2007 8:47 AM

All replies

  • User-503940700 posted

     You can use the Localizable attribute to the properties in your custom control as shown here:

    http://msdn.microsoft.com/en-us/library/system.componentmodel.localizableattribute.aspx

    Let me know if this helps,

    Vivek 

    Thursday, December 6, 2007 8:44 PM
  • User1785863221 posted

    Hi,

    Thanks for your reply, but i still don't understand how can i embed the resource file

    in the control's assembly.

    As I understand the Localizable attribute perseists the property values to resource values, but how can I bind a property value to

    a resource key?

    Thanks,

    Tal88

    Saturday, December 8, 2007 12:49 PM
  • User-503940700 posted

    Hi,

    You can easily embed resources files in the custom control DLL as shown in this article (check the part titled: Embedding Resources in a DLL Project):

    http://msdn.microsoft.com/msdnmag/issues/06/08/BasicInstincts/

    Hope this helps,

    Vivek

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 10, 2007 8:47 AM
  • User1785863221 posted

    Hi,

    Thanks for the reply.

    I managed to use the resx files (I located them in my dll project root directory and it worked) .

    Do you know if its possible to embed Themes in a web control dll? (I managed to embed a css file, but I want to enable a few Themes)

    Thanks,

    Tal88

    Thursday, December 13, 2007 1:29 AM
  • User-503940700 posted

    I am not sure about  themes, but I suggest you should post this question as a new post again in the forums!

    Vivek

    Friday, December 14, 2007 2:49 AM