How to multiple languages for Site Map

2010-09-30


You can not create different resource files for a Web.Sitemap file just like for other web form files if you use site map for you asp.net menu control.

Microsoft Online Community Support Zhao Ji Ma has provided solution:

Although you can localize the Title and Description properties of the SiteMapNode, the Url property cannot be localized in a site map in the same way as the Title and Description properties. To define different navigational structures based on a user's locale

  1. Define a different site-map file for each locale.
  2. Add each site map to the Web.config file.
  3. Programmatically switch to the appropriate Provider at run time. This is done by setting the SiteMapProvider property of the SiteMapDataSource object, or by setting the SiteMapProvider property of the SiteMapPath object, to the name of the provider. For more information, please see: http://msdn2.microsoft.com/en-us/library/ms178426.aspx (How to: Configure Multiple Site Maps and Site-Map Providers)