Closed jonaharagon closed 1 year ago
@jonaharagon hi, is that normal that your head repo got deleted as such?
@ultrabug I think that after my suggestion in https://github.com/ultrabug/mkdocs-static-i18n/issues/196 they stopped using this plugin. They work ultra fast, 1 day after my suggestion, they had a working deployment pipeline using the recommended way to create multilingual docs, and a few days later they overrode the default behavior of the language selector to work just like with this plugin.
Kind of weird though that they completely deleted the repo, while the PR was still open 🤔
Anyways, the commit is still visible, so it's possible to create a new PR with his commit 👌
In the
hreflang
tag, languages (ISO 639-1) and countries (ISO 3166-1) should be separated by a hyphen, not an underscore, and you should additionally be able to specify a four-letter language script (ISO 15924). This PR changes the regex to allow you to use any of the following:en
en-US
zh-Hant
zh-Hant-US
https://developers.google.com/search/docs/specialty/international/localized-versions#language-codes https://en.wikipedia.org/wiki/Hreflang
For backwards compatibility this does not remove the ability to use 5 character codes with an underscore like
en_US
even though that is non-standard.This fixes #193 for me.