the lang="en" always irritates me.
What if the page has mixed language content?
e.g. on the /r/france/ reddit. The page says lang="en" because every subreddit shares the same template. But actual content were generated by French speaking users.
the lang="en" always irritates me.
What if the page has mixed language content?
e.g. on the /r/france/ reddit. The page says lang="en" because every subreddit shares the same template. But actual content were generated by French speaking users.
You can add lang attributes to elements too!
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...
This is one of the great parts of the web: you can tag every element with the global lang attribute and have things work the way you expect.
For example, you can have CSS generate the appropriate quotation marks even in nested contexts so you can painlessly use <q> tags to markup scholarly articles even if the site itself is translated and thus would have different nested quotation marks for, say, the French version embedding an English quote including a French quote or vice versa.
In your Reddit example, the top level page should be in the user’s preferred site language with individual posts or other elements using author’s language: <html lang=en>…<div lang=fr>
lang="" if you don't know what language your page will be in. <html lang="en">, and then <p lang="fr"> on whatever other language content. Content from users that aren't tagged to be in a specific language doesn't really fit into this system though.
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...
That sounds good in theory. On bsky.social you are supposed to choose a lang before posting.
But again there's mixed language issue
Or do users even bother to choose the correct lang?