Understand alternate-language links

POM Translate publishes <link rel="alternate" hreflang="…"> entries for the available versions of the current public context. Each destination is built from the same base object and localized route rules as navigation links.

Generated language codes

Each configured locale receives its full normalized language tag, such as:

en-GB
es-ES

When only one enabled locale uses a given language, POM Translate also emits its short language form, such as en or es. It does not add an ambiguous short code when multiple locales share that language.

The base-language destination is also used for x-default.

Excluded locales

If the current post or term is excluded from a locale, that locale is removed before alternate URLs are generated. This keeps hreflang from advertising a localized route that POM Translate intentionally turns into a 404.

Where alternates appear

POM Translate writes its own alternate links in the public document head, except for administration screens, feeds, and embeds. It also adds alternate data to Rank Math sitemap entries. Yoast post sitemap URLs are normalized to the base-locale form, while the document-head alternates still advertise the language variants.

Audit a cluster

  1. Open the same canonical object in every enabled locale.
  2. Inspect the document head on each version.
  3. Confirm every advertised URL returns the expected object and locale.
  4. Confirm all versions list the same language cluster.
  5. Check that excluded locales are absent.
  6. Verify x-default points to the base-language address.
  7. Compare full tags and any short tags with the configured locale list.

Do not infer hreflang from menu labels or translated titles. It is a relationship between URLs, and incorrect slugs or prefixes will propagate into the alternate set.

Canonical behavior is explained in Understand canonical URLs.