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.
This patch changes the $url in i18n_l() to the ones of the translated nodes or taxonomy-listings, if they exist.
E.g. when node/23 is the 'en' version of node/65, and node/45 the 'de version, the links on the flags will change into:
en/node/23
de/node/45
when viewing that node/65.
Something similar goes for taxonomy listings. only there the tid(s) will change into their translated equivalent, if existing, otherwise they remain the same. Works for complex urls with or or and/.
Bèr
Comment | File | Size | Author |
---|---|---|---|
i18n_links_to_translations.patch | 4.38 KB | Bèr Kessels |
Comments
Comment #1
Uwe Hermann CreditAttribution: Uwe Hermann commentedThis sound very cool. I'm very interested in this patch. One question: Does it support URL aliases, e.g. mapping of en/welcome to de/willkommen etc.?
Comment #2
Bèr Kessels CreditAttribution: Bèr Kessels commentedI do not know. Sorry. Maybe you can check this for me, Uwe? I have released my sites that use this without paths, because the concept of paths became far too complex (vor my cleints) when using i18n.
Comment #3
Jose Reyero CreditAttribution: Jose Reyero commentedCommitted to HEAD