I have a website that is available in both English and Japanese.

English is the default language and has a path prefix of "en".

Japanese has a path prefix of "ja".

Users can log in from the front page via a block.

If a user whose account is set to Japanese lands on the English front page and logs in, he/she will be taken to /en/mylogindestination instead of /ja/logindestination.

How can I redirect users with Japanese-language acconts to /ja/mylogindestination (and users with English-language accounts to /en/mylogindestination)?

I already have a number of login-related fixes in Rules so if this can be done in Rules that would be a plus, but a custom module is also ok.

1 Answer 1

    function module_user_login(&$edit, $account) { 



Also, iirc, if your user has a language set, you can set one of the language detection method's to be "user preference", which would kick them over to the correct language after login.

  • Setting it to "user preference" and clearing the cache did not automatically redirect on my site, though I have a lot of modules enabled and one of them could be blocking that... Aug 2, 2012 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.