I have an ASP Menu like this:
<asp:Menu ID="NavigationMenu" runat="server"
EnableViewState="False" IncludeStyleBlock="False"
Orientation="Horizontal" meta:resourcekey="NavigationMenuResource1">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="<% MenuItemResource1 %>" meta:resourcekey="MenuItemResource1"/>
<asp:MenuItem NavigateUrl="~/Products.aspx" Text="Products" meta:resourcekey="MenuItemResource2" />
</Items>
</asp:Menu>
What I want to do, is to change the MenuItem text based on the user language selection (CultureInfo). For example, the “Products” section should be called “Produits” in french.
I added a .resx file for english and french. If I use a < div> element with an Id, this works fine. The problem is that the asp MenuItem doesn’t seem to have an ID, so I’m not able to access it. Like the example, I tried to set the first MenuItem text with to a “Resource” item, but when I change the language, the text is not changing.
How can I change that text?
http://www.codeproject.com/Articles/14615/Dynamically-changing-menu-items-according-to-Cultu