Experimental project

This is a sandbox project, which contains experimental code for developer use only.

The link meta tag can be used to identify alternate versions of a page for language or regional purposes by setting the hreflang attribute.

<link href="http://www.example.com/usa" rel="alternate" hreflang="en-us" />
<link href="http://www.example.com/uk" rel="alternate" hreflang="en-gb" />

Check out what Google has to say about it for more information.

Currently the Metatag and Alternate hreflang modules provide support for setting the hreflang values but only do so when used with the locale module. Using locale might be a bit much for some sites when only a few areas of a site have different regional variations, or translation support isn't necessary, so this module provides a way to specify alternate versions of a node through an entity reference field.

This module assumes that regional specific information, such as assigning a node to a particular country, is already being set on the nodes in some way. Currently text list fields are supported, but other methods such as taxonomy may be supported in the future.

At the moment the module comes with support for different country English language variations, but making this customisable may be added soon.

Dependencies

Roadmap

  • Support more field types containing country information.
  • Larger set of languages/regions or allowing for these to be configured.
  • Auto updating of all referenced nodes so each node does not need to be edited.

Project information