mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Support for Content-Language
HTTP header
This commit is contained in:
parent
dda1573746
commit
c9edb6ffc4
Notes:
github-actions[bot]
2025-02-19 10:54:32 +00:00
Author: https://github.com/pbrw
Commit: c9edb6ffc4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3255
Reviewed-by: https://github.com/shannonbooth ✅
Reviewed-by: https://github.com/tcl3 ✅
5 changed files with 51 additions and 0 deletions
|
@ -3670,6 +3670,10 @@ Optional<String> Element::lang() const
|
|||
}
|
||||
|
||||
// - If there is no pragma-set default language set, then language information from a higher-level protocol (such as HTTP),
|
||||
if (document().http_content_language().has_value()) {
|
||||
return document().http_content_language();
|
||||
}
|
||||
|
||||
// if any, must be used as the final fallback language instead.
|
||||
// - In the absence of any such language information, and in cases where the higher-level protocol reports multiple languages,
|
||||
// the language of the node is unknown, and the corresponding language tag is the empty string.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue