WPML allows you to translate your site’s login and registration pages. This way, users can login or register for your site in their preferred language.
You can usually access these pages by going to URLs similar to these:
- Registering in a secondary language:
- Logging in:
- Logging in in a secondary language:
You first need to enable their translation and then, translate the pages as normal.
If your site uses nginx, there are some extra considerations, explained below.
To translate the login and registration pages, go to WPML → Settings and scroll to Login and registration pages. Check the box to allow translations.
Once you have the translation setting enabled, go to WPML → String Translation and translate them as you would any other string. You can search for each string in the search box, then add a translation by clicking the plus icon.
When you switch your site language to a secondary language and log out, the login screen should be the translated version.
Follow this same method to translate registration email and forgotten password emails.
If your site uses nginx and your language URL format is set to Different languages in directories, you may see a 404 error when trying to access a login or registration page in a secondary language.
To avoid this, you will need to adjust some settings.
Rules for translating the login and registration pages are usually stored in the htaccess file. Because ngnix does not access this file, you will need to modify the nginx settings to add the following rewrite rules. If you do not have the permissions to do so, please contact your hosting provider to make these changes.
The rule to add is:
rewrite ^/xx/wp-login.php /wp-login.php break;
Where xx is the language code.
For example, if the user has English, German, and French languages active on their site, the nginx rules would be:
rewrite ^/en/wp-login.php /wp-login.php break; rewrite ^/de/wp-login.php /wp-login.php break; rewrite ^/fr/wp-login.php /wp-login.php break;
If your language URL format is set to A different domain per language or Language name added as a parameter, no additional configurations are required.