respec
respec copied to clipboard
Support translations in configuration
Is your feature request related to a problem? Please describe. I'm always frustrated when I see:
otherLinks: [
{
key: "Translations",
data: [
{
"value": "ру́сский язы́к",
"href": "http://topolyan.com/w3c/html_media_capture_ru.html"
},
{
"value": "한국어",
"href": "https://techhtml.github.io/html-media-capture/"
},
{
"value": "日本語",
"href": "http://www.asahi-net.or.jp/~ax2s-kmtn/internet/media/REC-html-media-capture-20180201.html"
}
]
}
]
Describe the solution you'd like A way to specify translations.... maybe:
translations: {
"jp": "https://...",
"zh": "https://..."
}
Should we look into adding <link hreflang> tags also? https://en.wikipedia.org/wiki/Hreflang
Yes, good suggestion. I think iOS/Safari even suggests when translations are available, which is a nice touch.
It should probably be a separate plugin then? Showing it in headers (alone it could be a template) + adding link tags (templates shouldn't have such side effects).
Yeah, separate plugin would be fine.
I wonder if <a rel="alternate" hreflang="${lang}" lang="${lang}"> would get us same effect.