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.
There is no way to send people to a page in the current language. This could added by adding a language option per rule, or by adding the destination as a variable that could be translated.
Comments
Comment #1
mithy CreditAttribution: mithy commentedHi!
I don't know what do you mean. The destination can be whatever you want. Could you provide a detailed description ?
Comment #2
Percept CreditAttribution: Percept commentedI'm assuming the OP means that you can't specify different destinations depending on the language.
For example:
People login from a dutch page would need to be redirected to site.com/nl/welkom
and
people login from an english page would need to be redirected to site.com/en/welcome
Comment #3
mithy CreditAttribution: mithy commentedIt is pretty straightforward to do this in php snippet. Either you create multiple rules with concrete destinations and check the language in the condition, or you just create one rule where the destination depends on the parameter. The current language should be easily accessible, just check the drupal manual for the variable you have to read.
Comment #4
jmsosso CreditAttribution: jmsosso commentedIf anybody needs an example this is the way I did it:
<?php global $user; return $user->language == 'es'? 'node/108': 'node/111'; ?>