Difference between using resgen and Resource files for localization
I've been reading a few articles about localization in .NET and it seems there's a couple of different approaches. Some of the articles are quite old though.
Some articles suggest putting key开发者_StackOverflow value pairs into a text file and generating a .resources file using resgen. Others suggest using Resource files using the naming convention .en-US as an example, and then using some code (shown below) to get the strings I need depending on the culture.
ResourceManager rm = new ResourceManager("Resources", Assembly.GetExecutingAssembly());
Are there better approaches for this? I feel like it's too easy. Am I just scratching the surface in terms of localization? Surley there must be more...
I honestly don't know anything about resgen, but the App_LocalResources and the App_GlobalResources folders are built in and do a great job.
I really like the approach of using something like this
-About.aspx
-Default.aspx
-App_LocalResources/
-App_LocalResources/About.aspx.fr.resx
-App_LocalResources/About.aspx.resx
-App_LocalResources/Default.aspx.fr.resx
-App_LocalResources/Default.aspx.resx
EDIT:
here is some good info on Localization in ASP.NET
精彩评论