开发者

Retrieve Accept-Language browser settings in Silverlight

开发者 https://www.devze.com 2023-03-07 01:59 出处:网络
Every call to the server gets the Accept-开发者_StackOverflow社区Language value, but can I get that information within the Silverlight client?

Every call to the server gets the Accept-开发者_StackOverflow社区Language value, but can I get that information within the Silverlight client?

I found System.Windows.Browser.HtmlPage.BrowserInformation but it doesn't contain the user language preferences.


You mean the value that you would get via "Request.Headers["Accept-Language"]" in .net? I would just add a method to the web service that provides data to your silverlight to return it, then request it from Silverlight when the app starts up.

I usually back my Silverlight application with a server-side .net WCF service, so I would just add a method for this kind of information.

If you don't want a webservice method, you can also pass it to your Silverlight application at startup using initParms.

0

精彩评论

暂无评论...
验证码 换一张
取 消