Skip to content
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

consider whether document-level language fallback rules make sense in all cases #9807

Open
dbaron opened this issue Sep 28, 2023 · 0 comments
Labels
i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. needs tests Moving the issue forward requires someone to write tests

Comments

@dbaron
Copy link
Member

dbaron commented Sep 28, 2023

What is the issue with the HTML Standard?

As discussed in #9796 (comment) the rules for document-level language fallback in the section on lang and xml:lang attributes may not make sense for all cases. @annevk wrote:

I wonder if this fallback makes sense in all cases. In particular for synthetic documents or an XHR document or some such.

in reference to the existing text:

If there is a pragma-set default language set, then that is the language of the node. If there is no pragma-set default language set, then language information from a higher-level protocol (such as HTTP), 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.

It's also possible that (given the refactoring in that PR into a <dl class="switch"> that there could be some useful editorial refactoring of this large-ish "Otherwise" step into more than one step. However, I'm not sure whether or not that's desirable since all the other steps in the switch are conditions about the node itself.

@annevk annevk added i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. needs tests Moving the issue forward requires someone to write tests labels Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n-tracker Group bringing to attention of Internationalization, or tracked by i18n but not needing response. needs tests Moving the issue forward requires someone to write tests
Development

No branches or pull requests

3 participants
@dbaron @annevk and others