For projects that have translations, if the document is not fully translated, Google can display results for the base language untranslated strings in a translated version. We can address this with a sitemap, and we can also address this with meta tags:
https://support.google.com/webmasters/answer/189077
The implementation of this might be difficult though:
If we can use a common context variable that is passed in and used by major themes, then it's pretty easy for us to insert some <link> elements with the hreflang links.
If we can't use context data directly, we'll have to override a template and add the links in the template override (hoping that themes use this and don't override this to remove the block)
For example, a layout.html override would approximate this, only using context data with a list of translations:
A template override could work for the majority of projects, and only themes that remove the standard linktags block would not get the automated language feature.
For projects that have translations, if the document is not fully translated, Google can display results for the base language untranslated strings in a translated version. We can address this with a sitemap, and we can also address this with meta tags: https://support.google.com/webmasters/answer/189077
The implementation of this might be difficult though:
<link>
elements with the hreflang links.For example, a
layout.html
override would approximate this, only using context data with a list of translations:A template override could work for the majority of projects, and only themes that remove the standard
linktags
block would not get the automated language feature.