How do you organize your resource files?

We are trying to use resource files (.resx) in an ASP.NET application to store localized values. A site can have thousands of lines that we want to keep.

Is there a best practice for organizing values ​​in one or more resource files? Do you save all values ​​in one file? Do you separate multiple resource files by subject? Perhaps there is a common resource file for the general values ​​of the site, that is, "OK", "Continue", etc.?

It seems that storing all resources in one file will have support.

Any suggestions?

+7
localization
source share
1 answer

Yes, one file seems like a bad choice in an application with a moderate size or more :-)

We mainly use this approach:

  • each web form has its own local resources for buttons, tags, etc.
  • there are a number of global resources organized by topic β€” for example, a β€œcommon” resource for things like β€œyes,” β€œno,” etc .; one for error messages that appear everywhere, etc. - several global resources based on the area of ​​use.
  • any other code (more business code, not ASPX / ASCX code) has its own resource files

This is always a balance between the presence of hoodles files and the presence of files with too many records, although :-)

Mark

+4
source share

All Articles