This is a migrated thread and some comments may be shown as answers.

Webservice and localization

1 Answer 73 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Roman Sommer
Top achievements
Rank 1
Roman Sommer asked on 27 Jan 2009, 01:45 PM

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>
<telerik:RadMenuItem Text="Two (en-US)" Value="1">
</telerik:RadMenuItem>
<telerik:RadMenuItem Text="Three (en-US)" Value="1">
</telerik:RadMenuItem>

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 :-)

1 Answer, 1 is accepted

Sort by
0
Roman Sommer
Top achievements
Rank 1
answered on 02 Feb 2009, 08:31 AM

itemPopulating is working.. I forgot to add the necessary event handler :-/
Tags
Menu
Asked by
Roman Sommer
Top achievements
Rank 1
Answers by
Roman Sommer
Top achievements
Rank 1
Share this question
or