You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Setting CoreWebView2EnvironmentOptions Language property doesn't change accept-language http header unless you delete the Preferences file or use a new userDataFolder path.
That's the current behavior. I created an internal work item to track the issue. We'll either update the document or make it work as expected.
At the mean time, could you try to use --accept-lang command line switch to see whether it works? Something like ICoreWebView2EnvironmentOptions::put_AdditionalBrowserArguments(L”--accept-lang=es-MX”);
Indeed, this works. I can set the accept languages list at initialization using the switch "accept-lang".
By the way, the "accept-language" http header seems to be "calculated" using the concatenation of the "lang" and "accept-lang" switches. Good.
Nevertheless it is not possible to change neither the lang or the accept-lang after initialisation.
Using Edge, if I change my parameter "Preferred languages" I can immediatly see the change in the "accept-language" http header.
If the fix involves forwarding WM_INPUTLANGCHANGE to the WebView WPF host window then yes, I made a workaround by periodically checking Chrome_SystemMessageWindow of web view with GetKeyboardLayout in order to be able to understand when the input language have changed so if you fixed that then great and I can get rid of this small hack.
Description
Setting CoreWebView2EnvironmentOptions Language property doesn't change accept-language http header unless you delete the Preferences file or use a new userDataFolder path.
As reported in #833
Version
Runtime: 114.0.1823.79
Framework: Win32
OS: Win10
AB#45519111
The text was updated successfully, but these errors were encountered: