Consider for example, the English-Wikipedia page:
https://en.wikipedia.org/wiki/L'esprit_de_l'escalier
whose title is in the French language. The wiki-markup of the lede includes, correctly:
{{lang|fr|L'esprit de l'escalier}}
which produces the HTML:
<span xml:lang="fr" lang="fr">L'esprit de l'escalier</span>
However, there is no way to indicate that the level 1 heading (i.e. the page title) is in French, and it is rendered as:
<h1 id="firstHeading" class="firstHeading assess-start-text" lang="en"><i>L'esprit de l'escalier</i>[...]</h1>
there should be some way to set the language on that heading.