1

I am using the MvcSiteMapProvider and I want to localize the menu entries. So I have added the resourceKey attribute to my node as follows:

<mvcSiteMapNode  resourceKey="Home"  title="Home"  area ="" controller="Home" action="Index"/>

I have created ressource files for each language in the root of the App_GlobalResources folder, and I named them Mvc.sitemap.resx, Mvc.sitemap.nl.resx, etc. Of course, all keys referenced in the sitemap are defined in the resource files.

My sitemap is named Mvc.sitemap and is located in the folder SiteMap in the root of the project.

But both names do not work. The title attribute is null / empty when the sitemap is build, so the node won't appear.

I have also tried to use a resource file called Web.sitemap.resx.

EDIT:

I have set enableLocalization="true" in web.config as well as in Mvc.sitemap.

What am i doing wrong?

ckonig
  • 1,234
  • 2
  • 17
  • 29

1 Answers1

2

This thread may help you. You have to make sure the that you have set enableLocalization="true" in configuration if you are not using the latest bits.

Community
  • 1
  • 1
VJAI
  • 32,167
  • 23
  • 102
  • 164
  • 3
    The name of the Sitemap resource file (resx) should be the same name as the SiteMap xml file itself. More important: the values that are stored in the resx file have to get the suffix .title. Instead of `Home` it has to be `Home.title`. But only in the resx file, in the sitemap, `Home` is sufficient. – ckonig Jun 13 '12 at 11:08
  • 1
    Glad you finally tracked down the issue – VJAI Jun 13 '12 at 11:13