Welcome Guest Search | Active Topics | Sign In | Register

Menu Localization Options
David Hoyt
Posted: Thursday, February 7, 2008 10:22:21 AM
Rank: Newbie
Groups: Member

Joined: 9/15/2007
Posts: 2
I haven't been able to find any documentation on localization for the ASP.NET menu. How would I do this with a standard .net resource (resx) file? I'd like to be able to do something like:

Code: HTML/ASPX
<eo:MenuItem Text-Html="$resources:MyResources,My_Menu_Item_Resource_Key"></eo:MenuItem>


Similar to what web.sitemap and other asp.net server controls support. Am I missing something?

Thanks so much!
eo_support
Posted: Thursday, February 7, 2008 10:47:49 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi David,

You are almost there except for the exact syntax is like this:

Code: HTML/ASPX
<eo:MenuItem 
    Text-Html="<%$ resources:MyResources,My_Menu_Item_Resource_Key %>">
</eo:MenuItem>


Note the <% and %> marker. Without that whatever you give to Text-Html would just be literally taken without any intervention from ASP.NET.

Thanks
David Hoyt
Posted: Thursday, February 7, 2008 10:55:41 AM
Rank: Newbie
Groups: Member

Joined: 9/15/2007
Posts: 2
Thanks so much! Worked like a charm!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.