Alternative languages for menu button text

4 posts, 0 answers
  1. Clive Hoggar
    Clive Hoggar avatar
    334 posts
    Member since:
    Nov 2008

    Posted 16 Jul 2009 Link to this post

    Hi experts,

    I need to be able to swap the text on menu and sub menu buttons according to the language that is
    set in a session variable(for example) . What would be the best way to approach this? EG with the text variants 
    in a database table or xml file.

    Does anyone have any experience of this?

    Thanks for an advice!

    Clive

  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 17 Jul 2009 Link to this post

    Hi Clive,

    Please, see the following forum discussion which will provide you with ideas how to solve this problem:
    http://www.telerik.com/community/forums/aspnet/menu/localization-help.aspx



    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 20 Jul 2009 Link to this post

    What I do is switching the sitemap datasource.
    The reason - it "localizes" also breadcrumbs :)
    My Providers are all named (for some reason) SMP...
    Here the definition from web.config
     <add name="smpDE" description="Deutscher SiteMap provider." type="House1.Classes.HouseSitemapProvider" siteMapFile="DE.sitemap" securityTrimmingEnabled="true"/>  
     <add name="smpEN" description="English SiteMap provider." type="House1.Classes.HouseSitemapProvider" siteMapFile="EN.sitemap" securityTrimmingEnabled="true"/>  
     <add name="smpAdmin" description="Admin SiteMap provider." type="System.Web.XmlSiteMapProvider" siteMapFile="Admin.sitemap" securityTrimmingEnabled="true"/>  
     
    All of the providers could be System.Web.XmlSiteMapProivder (I derivied because I need extra functionallity)
    Here the code in my masterpage:
    SiteMapProviderCollection smpCol = SiteMap.Providers;  
    foreach (SiteMapProvider smP in smpCol) {  
        if (smP.Name.ToUpper() == "SMP" + strLng) { //found  
            dsSM.SiteMapProvider = smP.Name;  
            break;  
        }  
    }  
     
    <asp:SiteMapDataSource ID="dsSM" runat="server" ShowStartingNode="false" SiteMapProvider="XmlSiteMapProvider" /> 
    Last not least strLng contains 2 letters from the client culture.

    Regards

    Manfred
  5. Clive Hoggar
    Clive Hoggar avatar
    334 posts
    Member since:
    Nov 2008

    Posted 20 Jul 2009 Link to this post

    Hi
    Thanks a lot for this detailed response. I think I will do something along this line.
    Clive
Back to Top