Its emerged that including language links in the page HTML is useful for SEO purposes.
The reason a change is required on our side is that Google is **transitioning to a mobile first indexing crawler**. While the desktop site will still be crawled, mobile will be the default. While our mobile pages include a canonical URL to the desktop site, the mobile site will still be the primary source.
In T326829 we considered various solutions and decided to add these links to the BODY tag of the Minerva skin.
# Proposed solution
This does not impact [[ https://wikitech.wikimedia.org/wiki/Performance/Guides/Frontend_performance_practices#Size_of_HTML_payload | the first 14kB of HTML guideline from the performance team ]] so should not have any negative effect on page load. However, since this is non-standard there is no guarantee this will work for all search engines and will work in future.
Patch: https://gerrit.wikimedia.org/r/c/mediawiki/skins/MinervaNeue/+/879607.
# TODO
[] Add links to body
[] Update language link fallback to reveal the language links in the footer.
[] Remove MobileFrontend Special:MobileLanguages page.
# QA steps
* Disable JavaScript and visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Language_test
* Click language button
Expected: should stay within page and show 3 languages.
Clicking language should take you away from the page.
* Enable JS and click language button
Expected: overlay should open