locked
Telerik menu Localization RRS feed

  • Question

  • User1901078961 posted
    In my application i have one menu,that contains items generated from xml file need to replace strings means in this xml 'Text' in to my resource file global.resx Can you tell me the way to do localization a part of Xml file is <?xml version='1.0' encoding='utf-8' ?> <PanelItems> <PanelItem Text='Dashboard' NavigateUrl='../Index.aspx?id=Home'></PanelItem> <PanelItem Text='Catalog Management' NavigateUrl='../Index.aspx?id=CategoryHome&category=CatalogManagement'> <!-- --> <PanelItem Text='Products' NavigateUrl='../Index.aspx?id=ProductManager'/> here Text like 'Dashboard' 'Products' which is coming as left menu etc are replaced
    Thursday, March 26, 2009 6:32 AM

All replies

  • User1901078961 posted
    Can we localize this one,,even we are localizing web.site then why should??
    Thursday, March 26, 2009 9:47 PM
  • User-1136466523 posted

    Hi,

    From your description, it seems that you want to get the global resource object, and replace the specific strings in your xml text, right?

    In my view, if you xml string is in an xml file, you just need to open that xml file by some stream reader object, save the xml contents in a string object. After that, you can use GetGlobalResourceObject method to get the global resource object, and replace the original chars with it. And then, re-save the xml string into an xml file.

    Thanks.

    Wednesday, April 1, 2009 12:26 AM
  • User1901078961 posted
    I read similar things from some other sides,,i dont know how to open xml file in stream reader,any thing about that.In our project what we did for localization for eg:lblPaymentGatewaySettings.Text = ConfigurationManagerResource.PaymentGatewaySettings; here lblPaymentGatewaySettings is a label, ConfigurationManagerResource is one of the 5 resource filename ,PaymentGatewaySettings is Name for Value of that label This is the way what we did in Itemdatabound for grid Label editCustomShippingTitle = (Label)userControl.FindControl("lblTitle"); editCustomShippingTitle.Text = ConfigurationManagerResource.EditCustomShipping;
    Wednesday, April 1, 2009 1:16 AM