Overview of the Issue
When using Loginizer with WPML, you might experience the following issues: the custom error messages cannot be translated, and the login notification email always arrives in the default language.
Workaround
Go to WPMLSettings and add the following to the Custom XML Configuration:
XML
<wpml-config>
<admin-texts>
<key name="loginizer_msg">
<key name="inv_userpass"/>
<key name="ip_blacklisted"/>
<key name="attempts_left"/>
<key name="lockout_err"/>
<key name="minutes_err"/>
<key name="hours_err"/>
</key>
<key name="loginizer_login_mail">
<key name="subject"/>
<key name="body"/>
</key>
</admin-texts>
</wpml-config>Then translate the texts in WPMLString Translation. For the login notification email, also add the following code as a small must-use plugin (a PHP file in wp-content/mu-plugins):
PHP
<?php
add_action( 'init', function () {
global $loginizer;
$loginizer['login_mail'] = get_option( 'loginizer_login_mail', [] );
$loginizer['login_mail_subject'] = empty( $loginizer['login_mail']['subject'] ) ? '' : $loginizer['login_mail']['subject'];
$loginizer['login_mail_body'] = empty( $loginizer['login_mail']['body'] ) ? '' : $loginizer['login_mail']['body'];
}, 0 );