Skip Navigation
Originally written
September 1, 2020
Updated
September 9, 2020

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:

  • Registration: example.com/wp-login.php?action=register
  • Registering in a secondary language: example.com/fr/wp-login.php?action=register
  • Logging in: example.com/wp-login.php
  • Logging in in a secondary language: example.com/fr/wp-login.php

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.

Enabling translation of login and registration pages

To translate the login and registration pages, go to WPML → Settings and scroll to Login and registration pages. Check the box to allow translations.

Allowing the translation of login and registration pages

Translating login and registration pages

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.

Translating login and registration pages

When you switch your site language to a secondary language and log out, the login screen should be the translated version.

Translated login page

Follow this same method to translate registration email and forgotten password emails.

Translating login and registration pages for sites that use nginx

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.

Server requirements for sites that use nginx

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.