Resource file and Localization
I am trying out localization in C# 3.5. from what I learned, I can have seperate resource file "*.resx" for each local i want my application to support and at the same time one default resource file in case no specific resource is available. so in my test application, i have 2 resource files, resource1.resx and resource1.en-AU.resx. In my PC regional setting, i set my country to Autralia and format to English Australia, so I assume my local is Autralia that's why I create the second resource file.
The problem is when I run the application, it picks up resource from the default resource file not the Australia one. So can you tell me what's wrong? It suppose to pick up resource from the second resource file which is "resource1.en-AU.resx". And when I change from "resource1.en-AU.resx" to "resource1.en-US.resx", only then the application picks up resource from the second resource file.
Thanks for your help.
Kirtan PatelPosted Aug 6, 2009, 2:41 AM
Don't delete the Default Created resx file make copy of the default created resx file and then rename it
like
if i have Page "Default.aspx" then default created Localized Filename Will be Default.aspx.resx
Now for creating another culture resx file copy that Default.aspx.resx and Just rename copy it to Default.aspx.en-AU.resx
like below image
don't delete the default created one .
I tested it working on my pc .
Happy Coding :)
daraPosted Aug 6, 2009, 12:53 AM
Kirtan PatelPosted Aug 5, 2009, 11:53 PM
To Pickup the Resource File Automatically you Need to Change the Internet Explore Language Setting you can do this in Following Way
Move Your Preferred Language First By Move Up Button
Rerun the Application .Now Your Application Will PickUp Resource File Automatically .
Happy Coding :)