Skip to content

[css-text] Reference to HTTP Content-Language header for language declaration #5031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
r12a opened this issue Apr 30, 2020 · 2 comments
Closed
Labels
Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-text-3 Current Work i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. Testing Unnecessary Memory aid - issue doesn't require tests Tracked in DoC

Comments

@r12a
Copy link
Contributor

r12a commented Apr 30, 2020

1.3. Languages and Typesetting
https://drafts.csswg.org/css-text-3/#content-language

Note: Authors can tag content using the global lang attribute in HTML, the universal xml:lang attribute in XML, and the HTTP Content-Language header for content served over HTTP.

The i18n WG recommends always using document-internal declarations, even if the appropriate language is contained in the HTTP Content-Language header. Obtaining the language from the HTTP header should only be a last resort fallback, and even then it's problematic. See https://www.w3.org/International/questions/qa-http-and-lang (esp. https://www.w3.org/International/questions/qa-http-and-lang.en#http).

I think, therefore, the note should be reworded so that it doesn't imply that HTTP declarations are of equal validity to the lang attributes. Really it should say something like: authors can use the lang or xml:lang attributes, and some browsers in some cases may be able to extract something useful from the HTTP information if those are lacking. Personally, i'd be inclined to just drop the mention of the HTTP Content-Language completely.

(I was actioned to send this comment by the i18n WG)

@r12a r12a added the i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. label Apr 30, 2020
@r12a
Copy link
Contributor Author

r12a commented Apr 30, 2020

fwiw, reasons HTTP language declarations are problematic include:

  • they represent metadata rather than language-processing language
  • they may have multiple language value arguments, which is not appropriate for applying language for language-processing, and which currently breaks language declarations for browsers
  • HTTP declarations don't work unless the resource is served by a server
  • it suggests to authors that it may be ok to use the Content-Language meta element, which is deprecated in HTML and doesn't actually work on all browsers

@r12a
Copy link
Contributor Author

r12a commented Jun 25, 2020

Thank you for this edit. The i18n WG is satisfied with the resolution and has closed its tracker issue.

@frivoal frivoal added the Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. label Jun 26, 2020
@frivoal frivoal added the Testing Unnecessary Memory aid - issue doesn't require tests label Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-text-3 Current Work i18n-needs-resolution Issue the Internationalization Group has raised and looks for a response on. Testing Unnecessary Memory aid - issue doesn't require tests Tracked in DoC
Projects
None yet
Development

No branches or pull requests

3 participants