C# WebBrowser Control Globalization

后端 未结 1 1384
眼角桃花
眼角桃花 2021-01-24 12:55

I am making an application in C# using the WebBrowser control. Problem is i am not from an english speaking country and that control seams to send an english language instead of

1条回答
  •  南方客
    南方客 (楼主)
    2021-01-24 13:19

    I've tried various means to solve this problem with little success.

    The Accept-Language header seems to be hard-wired to use the culture configured in the user's Internet Settings. If you supply a value in the additionalHeaders parameter to WebBrowser.Navigate, this value will be overridden.

    If you change this, your WebBrowser control should send the correct language.

    I've also found a registry setting: HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer/International/AcceptLanguage

    Changing this registry setting should also modify the WebBrowser control's Accept-Language header.

    Unfortunately in my case, I want to be able to override the setting in a particular instance of the WebBrowser control and not modify global settings which may be used by other applications. So this approach is of no use. However, perhaps it will help you.

    0 讨论(0)
提交回复
热议问题