-
Notifications
You must be signed in to change notification settings - Fork 992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zola is validating language incorrectly #2169
Comments
Do you know a crate that validates language code for the browser? |
Both tags are valid, for a static site generator it might be useful to suggest adding a script to certain language codes. |
Let me investigate on this, I think I need to check what needs to be done and if needed probably a separate crate will be done. |
Looks like the crate |
Another crate seemingly doing exactly what is needed here is |
fluent-langneg sounds like a good solution |
Bug Report
Environment
Zola version: 0.17.2
Expected Behavior
zh-CN
should not be valid language and should be suggested to usezh-Hans-CN
orzh-Hans
instead. I have seenzh-CN
quite often in quite a few sites since it renders differently if it is done incorrectly and less readable.Current Behavior
zh-CN
passed language validation check since it usesunic-langid
but is not recognized by browser, it should instead usezh-Hans
which is specified by https://datatracker.ietf.org/doc/html/rfc5646#appendix-A and https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang.I filled an issue to hexo too hexojs/hexo#5186.
Step to reproduce
default_language = "zh-CN"
inconfig.toml
.The text was updated successfully, but these errors were encountered: