I am building my first Web Application with Localization and was wondering if it is better to just have a single resource file for each language or is there some best practice on breaking everything up into multiple files (i.e one file per page or something
like that).
I download that "porject" but it has no VS project file and no App_GlobalResources or App_LocalResources folder, and I am unable to find any .resx files. So my question still stands. Single file for each language or is there real best pratices for making
resource files?
Whether use single file or multiple files really depend on your application development and coding preference. Visual Studio has provided IDE support for you to automatically create page based local resource files (resx files) which help you manage and associate
localization properties to page controls' properties. In most cases, I think we'd prefer to using the built-in approach and create a set of localization resx files (based on the languages you want to support) for each page. And we will put some global or shared
properties/resource data in a centralized resx resource file.
If you're totally using your own ways to load localized data (from resx file) and set them to control or page markup, then you can just put all localized data in single resx file (one per language) and do not follow the per page based pattern used by visual
studio IDE.
Eagle_f90
Member
465 Points
531 Posts
One file or mutiple files for each language?
Dec 16, 2012 01:24 AM|LINK
I am building my first Web Application with Localization and was wondering if it is better to just have a single resource file for each language or is there some best practice on breaking everything up into multiple files (i.e one file per page or something like that).
Eagle_f90
Member
465 Points
531 Posts
Re: One file or mutiple files for each language?
Dec 16, 2012 01:52 AM|LINK
I download that "porject" but it has no VS project file and no App_GlobalResources or App_LocalResources folder, and I am unable to find any .resx files. So my question still stands. Single file for each language or is there real best pratices for making resource files?
Steven Cheng...
Contributor
4187 Points
547 Posts
Microsoft
Moderator
Re: One file or mutiple files for each language?
Dec 27, 2012 07:49 AM|LINK
Hi Eagle,
Whether use single file or multiple files really depend on your application development and coding preference. Visual Studio has provided IDE support for you to automatically create page based local resource files (resx files) which help you manage and associate localization properties to page controls' properties. In most cases, I think we'd prefer to using the built-in approach and create a set of localization resx files (based on the languages you want to support) for each page. And we will put some global or shared properties/resource data in a centralized resx resource file.
#ASP.NET Web Page Resources Overview
http://msdn.microsoft.com/en-us/library/ms227427(v=VS.100).aspx
#Walkthrough: Using Resources for Localization with ASP.NET h
ttp://msdn.microsoft.com/en-us/library/fw69ke6f(v=vs.100).aspx
If you're totally using your own ways to load localized data (from resx file) and set them to control or page markup, then you can just put all localized data in single resx file (one per language) and do not follow the per page based pattern used by visual studio IDE.
Feedback to us
Microsoft One Code Framework