locked
Localization and Sitemap URL RRS feed

  • Question

  • User-143677941 posted

    Hi all,

     Regarding the localization of the sitemap.

     On the mentioned MSDN article http://msdn.microsoft.com/en-us/library/ms178427.aspx you can read that the URL property cannot be localized:

    <quote>

    The Url property cannot be localized in a site map in the same way as the Title and Description properties.

     </quote>

     Now, on the asp.net site, http://quickstarts.asp.net/QuickStartv20/aspnet/doc/navigation/sitenavapi.aspx#localization you can read the following:

     <quote>

    Navigation data stored in a sitemap file may need to be localized. The URL, Title, and Description attributes on a <siteMapNode> element can all be localized. In addition, any custom attributes that a developer places on a <siteMapNode> element can also be localized.
    </quote>

     Who is right/wrong here. I tried localizing the URL property without success.

    Any info here highly appreciated.

     

    Greetings EriSan

    Wednesday, September 6, 2006 9:09 AM

Answers

  • User-1936818034 posted

    Hi~ Seems .sitemap file is hard to localize, can you afford multiple sitemap files for different culture?


    1. Create multi sitemap files.

    2. Add multiple sitemap providers in web.config:

    <system.web>
    <siteMap>
    <providers>
    <add
    name="SiteMap1"
    type="System.Web.XmlSiteMapProvider"
    siteMapFile="~/Web1.sitemap" />
    <add
    name="SiteMap2"
    type="System.Web.XmlSiteMapProvider"
    siteMapFile="~/Web2.sitemap" />
    </providers>
    </siteMap>
    </system.web>

    3. To change sitemap, just set the SiteMapProvider provider of SiteMapDataSource
    control. For example:

    this.SiteMapDataSource1.SiteMapProvider =
    this.DropDownList1.SelectedValue.ToString();

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 12, 2006 4:30 AM