I am creating an ASP.NET web application in C#, and have to localize the application into English and French. I have created two resources files: App_GlobalResources\Resources.resx and App_GlobalResources\Resources.fr.resx containing the english and french content.
When I run the application with my browser set to French (fr_FR), the french content is correctly displayed in the markup.
Within the code-behind, when I access values from the resources, it returns the default english values only. e.g.
this.CompanyName.Text = string.Format(App_GlobalResources.Resources.CompanyLocationsFormat, companyName);
Debugging the app shows that the CurrentCulture and CurrentUICulture are both correctly set to fr_FR.
Can anyone explain how I can get the code-behind to use the culturally-appropriate resource file?
Many thanks
(C#, ASP.NET 3.5 SP1, Visual Studio 2008, IE 8.0.7600)