views:

157

answers:

1

I have succesfully added localization to my website. Came next day and it does not work. After reading alot of posts and did some troubleshooting my self. I found out that the Page ignores the page.aspx.en-US.resx. Because I dont have a standard resx for the page it shows the label caption i have in the designer. I just took out the en-US and made it the default( page.aspx.resx). The page correctly displays the strings that are in the resource file. I have used the tutorial from MSDN and the same tutorial you can find it All over the internet I even contributed to te tutorial on MSDN. when you are using Authentication or Impersonation you must grant access to the APP_LocalResources folder through the web.config

<location path="App_LocalResources">
<system.web>
 <authorization>
  <allow users="*">
 </authorization>
</system.web>

That I found out yesterday and solved the problem, but now It does not use the page.aspx.en-US.resx , unless it's the default I find it very strange. Does someone has the solution or suggestion?

+2  A: 

I found the solution to my challenge. In order for the resource files to work you have to have a default resource file in combination with the other resource files e.g.:

default.aspx.resx
default.aspx.en-US.resx
default.aspx.nl-NL.resx

Even if you have only one language and you want to use resource files you have to have the default resource file for it to work, otherwise it will ignore any resource file you may have under the App_LocalResources.

Alexei