ablog
ablog copied to clipboard
Markup the article language
Describe the feature
The <html> element has a lang attribute for the whole page/site but the blog post text doesn't have its own attribute. Which is fine if the blog post is in the language of the site, but it may break things if it is not.
For instance my blog is in English for all but one blog post which I marked as German (de) in the .. post:: directive. As Sphinx's basic.css allows the browser to automatically hyphenate text, the wrong rules for hyphenation are used in that German post.
Proposed solution
Extend the <div class="body" role="main"> with a lang attribute with the value given with :language: in the post, at least if it differs from the one in the <html> element.