 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
This might be a compatibility issue between WPML and WPForms, which would be something we would need to solve in our WPForms Multilingual Addon.
I will try to replicate this issue on a new WPML test site with WPForms and then get back to you with the results.
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Your site is not using the latest version of WPForms. Also, some other plugins are not updated.
Can you please update all plugins and then test again by creating a new user and confirm if the issue persists?
If this will not solve the issue, please install the latest version of "WPForms User Registration" on the following test site and try to replicate the issue:
One-Click-Login:
hidden link
|
 tomasH-28
|
Hello Andreas,
I updated all plugins and tried again. Snippet with change user languange is active, I also tried to manually change admin languange to English. - Confirmation email about user activation is still in Czech.
Also installed WP user registration on your testing site.
- created form "Registration" Original languange here: hidden link
- Created DE version of page as your plugin settings - hidden link
- Configured form in WP forms for registration - You can check form "User registration form"
- Traslated specific strings to DE (especially strings featuring in User email after user manual activation)
- Tried to test with user registration on hidden link
But activation email doesnt arrived - There is probably problem with emails on your testing site - Maybe missing SMTP configuration?
Please let me know if you can do something with emails, or try it myself.
Best Regards
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Thank you very much for your cooperation!
The sandbox can sadly not send out emails but I have installed an email logging plugin.
I then registered on hidden link
I can confirm that the admin notification in this case is sent in German languages, even if the admin uses a different language on the profile like for example English.
I completely understand that in this case the emails are supposed to be sent in the English language to the admin and in the current site language (German) to the client.
I will be escalating this issue internally for further revision and then get back to you.
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
The issue was replicable on our sandbox and has been escalated to the compatilbity team for further revision.
Once I received internal feedback I will contact you on this ticket again.
|
 tomasH-28
|
Hi Andreas, thank you for forwarding it for further processing. Just to clarify. I'm not talking about emails that are sent to the administrator. That's not that important. It's a confirmation email that is sent to the user who registers on the website and the admin subsequently approves their registration.
The first automatic email after registration is fine. There, the translation into the desired language will occur. The problem is with the second email that should arrive to the user after the admin approves their registration. There, we never managed to translate the email into the language in which the website was translated at that moment.
In the test site that you sent, this email second email should be in German - because the customer registered on the German version of the registration form - hidden link.
Best Regards,
Tomas
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
Thank you very much for the details!
I was able to confirm this issue and I am sadly not able to find a workaround. The approval email will always be sent in site default language on my test, no matter which language is set for the admin.
I have forwarded this information to the compatilbity team and I will reach out to you again once I receive feedback.
|
 Andreas W.
WPML Supporter since 12/2018
Languages:
English (English )
German (Deutsch )
Timezone:
America/Lima (GMT-05:00)
|
We would like to provide a workaround that will register the strings again and then allow you to translate them.
You can place this snippet inside the functions.php file of the theme or use a Code Snippet Plugin.
It would be recommended to install the Hello Elementor Child Theme and place the code into the functions.php file as if you would use the parent theme, the changes will be overwritten if you update the theme.
Guide on creating a Hello Elementor Child Theme:
hidden link
or
Code Snippets Plugin:
https://wordpress.org/plugins/code-snippets/
Here is the snippet:
add_filter( 'wpforms_user_registration_email_notifications_after_activation_user_email', function( $email ) {
if ( ! empty( $email['address'] ) ) {
do_action( 'wpml_switch_language_for_email', $email['address'] );
}
// Apply translation manually
$email['subject'] = apply_filters( 'wpml_translate_single_string', $email['subject'], 'wpforms-41', 'setting-registration_email_user_after_activation_subject' );
$email['message'] = apply_filters( 'wpml_translate_single_string', $email['message'], 'wpforms-41', 'setting-registration_email_user_after_activation_message' );
return $email;
}, 5 );
Now go again to WPML > String Translation and you should find newly registered strings inside a wp-forms text domain called 'wpforms-41'.
Let us know if you need assistance with applying this workaround.
The issue has been escalated to the development team for further integration inside the WP Forms Multilingual Addon.
|
 tomasH-28
|
Hello Andreas,
thank you! Its working now, email sent to the user after manual activation is translating now.
I added snippet as you wrote. Just edited one thing - "wpforms-41" was probably related to Form ID. My registration form got ID: "wpforms-881." So I changed it.
Another thing. The newly registered strings you are writing about were already there from the very beginning and were already translated, as I wrote in the introduction to the ticket.
There was not problem with missing strings, but the translated strings were not copied to the email anyway.
after adding this snippet, its just started working and email is translated. I didn't translate any new strings.
So thank you again for your cooperation, and also thanks to Bobby.
Best Regards,
Tomas
|