: Correct way of internationalizing links I am interested in a correct way to show search engine that the link is a translation of some content to another language. For example: you have some
I am interested in a correct way to show search engine that the link is a translation of some content to another language.
For example: you have some article written in German. So this is original post, but this post was also translated into English, Japanese and French. How should I semantically format these links?
Looking at wikipedia, I see that they are doing it with <a href="..." title="..." lang="fr" hreflang="fr">Français</a>. Also I assume that Wiki is doing this in the right way, but I want to know for sure is this the correct way? Also I do not see there how should I specify that German is the original article and everything else is a translation.
More posts by @Karen161
1 Comments
Sorted by latest first Latest Oldest Best
In HTML5, the alternate link type should be used.
It gets a special meaning when used in combination with the hreflang attribute:
If the alternate keyword is used with the hreflang attribute, and that attribute's value differs from the root element's language, it indicates that the referenced document is a translation.
So a link to the French translation could look like:
<a href="…" rel="alternate" hreflang="fr" lang="fr">Français</a>
HTML5 doesn’t offer a way to denote which of the documents is the original one.
Wikipedia isn’t using the alternate link type because the pages in other languages are not (necessarily) translations. They are about the same topic, but may contain totally different content.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.