Language paths per country- how to redirect users to their respective language's path on login? 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.
function module_user_login(&amp;$edit, $account) { 

     drupal_goto($user-&gt;language."/logindestination");

    }


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.