Localization for web.sitemap doesn't seem to work RRS feed

  • Question

  • User301348547 posted
    I am currently localizing my application. For pages it is working pretty fine (with asp:localize elements where needed and generating local resource through visual studio, then copying it, renaming it and filling it).

    I tried something similar for web.sitemap . I read how to do it: enabledLocalization, passed resourceKeys by hand, created a resource file web.sitemap.resx in App_LocalResources, filled it with strings like AnswerQuestions.Title (I tried it with a description too). Filled in everything in english, then copied it and renamed it to web.sitemap.fr.resx , opened it, translated everything.
    And it doesn't work :( - I don't know why. Here is my sitemap:

    <?xml version="1.0" encoding="utf-8" ?>
    <siteMap enableLocalization="true">
        <siteMapNode  title="Home" url="Default.aspx">
            <siteMapNode title="Answer Questions" resourceKey="AnswerQuestions"  url="Answer/Default.aspx"/>
            <siteMapNode title="Edit Questionnaires" resourceKey="EditQuestionnaires" url="Edit/Default.aspx" >
                <siteMapNode title="Edit Questions" resourceKey="EditQuestions" url="Edit/EditQuestions.aspx" />
                <siteMapNode title="Relate To User" resourceKey="RelateToUser" url="Edit/RelateToUser.aspx" />
            <siteMapNode title="Results" resourceKey="Results" url="Results/Default.aspx" >
                <siteMapNode title="Single User's"  resourceKey="SingleUser" url="Results/Single.aspx" />
                <siteMapNode title="Simple Report"  resourceKey="SimpleReport" url="Results/Simple.aspx" />
            <siteMapNode title="Privacy" resourceKey="Privacy" url="Disclaimer.aspx" />
            <siteMapNode title="Register"  resourceKey="Register" url="Register.aspx" />
    Wednesday, May 31, 2006 9:12 PM

All replies

  • User460701003 posted
    I think I figured out what is going on here completely by mistake. Copy the localization files you created in the App_LocalResources to the App_GlobalResources, do not change them and run your app. The localization for the menu works. When you go to edit the files, you will see a bunch of red ! next to your items, the schema for the globalization files does not like the . construct, it wants _'s, but localization files need the .  This appears to be a bug in the menu control that it does not look in the App_LocalResources folder.
    Tuesday, June 6, 2006 3:50 PM
  • User301348547 posted
    Oh, thank you very much. I had tried this, but the red !s had dissuaded me from pushing the "run" button.
    It is strange indeed, and it's about the 4th bug found during this project :(.
    Tuesday, June 6, 2006 5:06 PM