Allow Redirecting to another language

Created on 20 January 2017, almost 8 years ago
Updated 19 September 2024, 3 months ago

Currently when adding a redirection there is a Language setting. If I understand correctly this setting is used to determine which language that should trigger the redirect rule which is done by the incoming url. So if it is set to English it will trigger a redirection if the incoming url is determined to be targeting the english language.

If the above is correct it means that the target url will always be to a page in the same language as the determined incoming url.

In a current project we have a lot of incoming urls that looks like this: /zh-hans
These urls trigger 404's since our site has the chinese prefix /cn
I want to redirect these urls to the front page in chinese: <front>

It seems that this is not possible using the Redirect module. If I add a rule with language set to english, the redirect will go to the english start page. If I set the language to chinese the redirect rule will not trigger, since /zh-hans is not considered to be a chinese page.

My suggestion is to add a Target language setting when adding a redirect rule. This setting would decide which language the redirection should point to, regardless of the language determined by the incoming url.

Hopefully this makes sense :)

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΈπŸ‡ͺSweden reekris

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024