Skip Navigation

[Resolved] Login forms and emails are not translated

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by katjaL 8 months, 4 weeks ago.

Assisted by: Minesh.

Author
Posts
#2685447

There is something odd in Toolset login, forgot password and reset password forms and emails; they just aren't translated as they should be. As discussed already here: https://toolset.com/forums/topic/login-forget-password-and-reset-password-forms-translations/

I always have to do the translations with php snippets even though I know the strings in question are translated in WP core.

This is what I use with Finnish:

add_filter('gettext', 'mycustom_func', 10, 3);
function mycustom_func($translated_text, $text, $domain){

if($text == 'Username or Email'){
$translated_text = 'Tunnus tai sähköpostiosoite';
}
elseif($text == 'Get New Password'){
$translated_text = 'Uusi salasana';
}
elseif( strpos( $text, 'Invalid username or email') !== false ){
$translated_text = 'Tunnusta/sähköpostia ei ole järjestelmässä';
}
elseif( strpos( $text, 'ERROR') !== false ){
$translated_text = 'Virhe: ';
}
elseif( strpos( $text, 'Enter a username or email address') !== false ){
$translated_text = 'Anna tunnus tai sähköpostiosoite ';
}
elseif( strpos( $text, 'New password') !== false ){
$translated_text = 'Kirjoita uusi salasana';
}
elseif( strpos( $text, 'Repeat new password') !== false ){
$translated_text = 'Toista uusi salasana';
}
elseif( strpos( $text, 'Your password has been reset') !== false ){
$translated_text = 'Voit nyt kirjautua uudella salasanallasi.';
}
return $translated_text;

}

#2685536

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Are you using the above code? What if you try to change the hook priority to 20? Does that help? if no:

Can you please share where you added the login form as well as send me admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2686215

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

The code is just to translate the text in other languages so it does not affect the login process.

#2686225

Yes I understand that, that's why I have to use this code with Toolset. Without Toolset, the login form, the password change emails and other stuff, are properly site's default language. (And not all/partly in English as always with Toolset.)

For some reason I don't now quite get my message through. Anyway, let's forget this, if this really is the way Toolset works: Toolset does not use core's translations concerning login.