Question

Can you explain how to implement localization in web.sitemap please?

Was it helpful?

Solution

Use a global resource file.

App_GlobalResources\Web.sitemap.resx

Then use keys in the web.sitemap like;

<siteMapNode url="somepage.aspx" title="Name"  resourceKey="PageName"/>

OTHER TIPS

If you have global resources you can use it like this

<siteMapNode url="~/Default.aspx" Title="$resources:SiteMapLocalizations,HomePageTitle"></siteMapNode>

Where SiteMapLocalizations: is the resource Name HomePageTitle: thee resource Key

Reference: http://msdn.microsoft.com/en-us/library/ms178427.aspx

It's worthy to notice that you also need to set enableLocalization="true" at siteMap tag. Otherwise it will not work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top