[BUG] Webkit and Firefox do not respect locale setting
See original GitHub issueContext:
- Playwright Version: latest
- Operating System: Win10
- Node.js version: LTS
- Browser: Webkit, Firefox
- Extra: [any specific details about your environment]
Describe the bug Our frontend application is built using Angular.
Every request it sends to the backend must have Accept-Language
header, with short language value, e.g. cs
. NOT cs-CZ
- that is considered invalid, and backend will return HTTP error.
I have two issues:
-
when
locale
is not explicitly set in the configuration, then Webkit and Firefox ignorecs
value which should be set by application under test, and seten-US
forAccept-Language
header value. -
when
locale
is explicitly set - either in config file, or usingtest.use()
in the test, then it:- in the trace console log shows, that header value is
cs
, BUT backend logs shows, that in reality it sendscs, cs-CZ
. - Firefox will start sending correct request header intermittently, or after calling
page.reload()
- Webkit will be still bugged
- in the trace console log shows, that header value is
This is currently a blocker for testing on these two browsers, since without backend data application cannot render needed content.
Issue Analytics
- State:
- Created 10 months ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Locale management — Firefox Source Docs documentation
A locale is a combination of language, region, script, and regional preferences the user wants to format their data into. There are multiple...
Read more >1366134 - [UX] Decision about locale selection ... - Bugzilla@Mozilla
The setup works well, except for a scenario where the OS language is completely different from Firefox language. At the moment, there's no...
Read more >1556890 - Language displayed via intl.locale.requested="" not ...
My system locale is Japanese, but with no langpack installed, Firefox was in English. However, I'm not getting the "Join Firefox" popup/page on...
Read more >1045053 - Determine default Accept-Language header from ...
[Feature/regressing bug #]: New work to make OS and app locale selections affect HTTP Accept-Language header. [User impact if declined]: Users will need...
Read more >navigator.language js property doesn't reflect browser default ...
1) This bug doesn't exist in Mozilla localized build, since the value of "general.useragent.locale"" is hardcoded in these files, http://lxr.mozilla.org/l10n/ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think we have enough information to act.
Thanks