hreflang: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
 
Line 10: Line 10:
** e.g. [https://www.gov.uk/government/world/france France] (in English) vs. [https://www.gov.uk/government/world/france.fr France] (en Français).
** e.g. [https://www.gov.uk/government/world/france France] (in English) vs. [https://www.gov.uk/government/world/france.fr France] (en Français).
** e.g. [https://www.gov.uk/government/world/brazil Brazil] (in English) vs. [https://www.gov.uk/government/world/brazil.pt Brasil] (em Português).
** e.g. [https://www.gov.uk/government/world/brazil Brazil] (in English) vs. [https://www.gov.uk/government/world/brazil.pt Brasil] (em Português).
* Wordpress.org doesn't use hreflangs for links to localised content

Latest revision as of 14:45, 3 April 2016

hreflang is an attribute in HTML to mark that the target of links are in a particular language. When combined with rel-alternate, it can be used to mark that another page has the same (or broadly similar) content but translated into another language.

Places using hreflang properly

  • Wikipedia
    • e.g English article on New York City links to foreign language versions. Each has an appropriate hreflang.

Places that should use hreflang

  • GOV.UK, the UK Government's official website, has content about the relationship of Britain with other countries. That content is often available in those languages. There's no hreflang links between content in different languages.
  • Wordpress.org doesn't use hreflangs for links to localised content