Webservice and localization

2 posts, 0 answers
  1. Roman Sommer
    Roman Sommer avatar
    2 posts
    Member since:
    Jan 2009

    Posted 27 Jan 2009 Link to this post

    I'm wondering how I would handle localizations.
    As the datasource backend I chose to use a webservice. Unfortunately I'm unable to pass additional arguments to the webservice.
    I was under the impression I could add values to the context object (which in fact is a Dictionary<string, object>)... but somehow it doesn't really work.

    I added that javascript snippet to the page containing the menu:
        function itemPopulating(sender, eventArgs) {
            var item = eventArgs.get_item();
            var context = eventArgs.get_context();
            context["CategoryID"] = item.get_value();

    context["culture"] = #<%# CultureInfo.CurrentCulture.ToString() &>':?
    If I could pass CultureInfo.CurrentCulture.ToString() I could handle localization in my webservice backend.. not sure if that goes very well with caching though. As for the statically defined items in the aspx page I could probably use the asp ResourceManager right?

    <telerik:RadMenuItem Text="One (en-US)" Value="1" ExpandMode="WebService">
    <telerik:RadMenuItem Text="Two (en-US)" Value="1">
    <telerik:RadMenuItem Text="Three (en-US)" Value="1">

    Oh and btw.. the local live sample (radmenu with webservice) doesn't work :-/
    If I remember correctly I encountered sql exceptions while trying to fill the datatable.
    I hope I didn't break the solution when elevating it to .net 3.5.

    TIA :-)

  2. Roman Sommer
    Roman Sommer avatar
    2 posts
    Member since:
    Jan 2009

    Posted 02 Feb 2009 Link to this post

    itemPopulating is working.. I forgot to add the necessary event handler :-/
Back to Top