locked
Resource (.resx) files RRS feed

  • Question

  • User-850127045 posted

    I don't understand what these are for.  I've tried to research it via Google but its not coming up with any real useful information.  Went to the index of my Beginning ASP.NET Wrox book and there isn't even an index for resource files.

    They appear just to be .xml files with a different extension.

    Anybody got a good writeup as to what these are useful in my application development?

    Wednesday, May 10, 2006 12:58 PM

All replies

  • User-2041805088 posted

    Resource files are used for localization. Let's say you need to create a multi-language applicaton. You need somewhere to store the translations and other resources specific to that language. That is what resource files are for.

    HTH,
    Ryan

    Wednesday, May 10, 2006 1:05 PM
  • User-850127045 posted

    Well I can see if you have images, buttons, etc. that have localization text on there how this would work.  However, if you have text in html that gets translated...that text would be so buried in the page, and all over the place,  how can a resource file help you?

    Wednesday, May 10, 2006 2:34 PM
  • User-2041805088 posted
    However, if you have text in html that gets translated...that text would be so buried in the page, and all over the place,  how can a resource file help you?

    You're not translating like you read something in a foreign language and translate it to another language. It's more along the lines of setting the current culture and doing something like this:

    <asp:Label ID="SomeLabel" Text="<%$ Resources : Resource, SomeLabelText %>" runat="server" />

    HTH,
    Ryan

    Wednesday, May 10, 2006 4:03 PM
  • User-1229516020 posted

    I don't understand what these are for.  I've tried to research it via Google but its not coming up with any real useful information.  Went to the index of my Beginning ASP.NET Wrox book and there isn't even an index for resource files.

    They appear just to be .xml files with a different extension.

    Anybody got a good writeup as to what these are useful in my application development?



    You can see that working in a Microsoft Video Tutorial "How do I" series :
    http://msdn.microsoft.com/asp.net/learning/learn/newtodevelopment/default.aspx

    the video is called: ASP.NET HOW DO I Video Series: Localization
    Thursday, May 11, 2006 6:04 PM
  • User-290717727 posted
    I looked all over the place for this... thx alot
    Thursday, May 18, 2006 11:03 AM