Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If a page's langcode is LANGUAGE_NONE it may be useful if the hreflang meta tags could be output for all locales. This would help with e.g. the front page.
Comment | File | Size | Author |
---|---|---|---|
#4 | all-locales-LANGUAGE_NONE-2830065-4.patch | 2.71 KB | jantoine |
|
Comments
Comment #2
DamienMcKennaComment #3
DamienMcKennaWe'd need to add new tokens for this, it could get messy.
Comment #4
jantoine CreditAttribution: jantoine as a volunteer commentedHere's a first stab at this. I'm not sure if we need to worry about the default behavior changing?
With the site default language set to example.com.au and a second custom locale of example.co.nz added, here are various outputs:
I'm not sure if the tag should exist at all on pages with a single translation, but I wasn't sure if it mattered either way.
Comment #5
mstrelan CreditAttribution: mstrelan commentedPatch needs a re-roll.