Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement localization in web.sitemap

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

like image 857
peter Avatar asked Mar 05 '09 12:03

peter


3 Answers

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

like image 186
Ahmed Magdy Avatar answered Oct 03 '22 06:10

Ahmed Magdy


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"/>
like image 21
Dead account Avatar answered Oct 03 '22 05:10

Dead account


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

like image 33
André Luiz Carletti Avatar answered Oct 03 '22 06:10

André Luiz Carletti