[Resolved] WP Forms user Activation Emails Not Translating
This thread is resolved. Here is a description of the problem and solution.
Problem: You are trying to translate a notification email from Czech to English in WP Forms, which is sent after user registration and manual approval. Despite translating the string in WPML, the email remains untranslated. Solution: We recommend registering the strings again and translating them. You can add the following snippet to the functions.php file of your theme or use a Code Snippet Plugin. It's advisable to use a child theme, such as the Hello Elementor Child Theme, to avoid losing changes when updating the theme. Here are some resources to help you:
After adding the code, revisit WPML > String Translation to find the newly registered strings under the 'wpforms-41' text domain.
If this solution does not resolve your issue or seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If needed, please open a new support ticket for further assistance.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Background of the issue:
I'm trying to translate a notification email from Czech to English in WP Forms, which is sent to a user after registration on the website and manual approval by the website administrator. I found the string to translate and translated it using WPML.
Symptoms:
The email that arrives to the user after registration and manual approval is not translated, even though the string is translated in the WPML editor. This is probbably same issue like here: https://wpml.org/forums/topic/user-activation-emails-not-translating/ The problem was not resolved though.
I applied your recommendation. See screenshot. I then slightly edited the Czech text and saved it. Then I checked it in the WPML translation editor and everything looked fine there again. The texts and translations were updated. Unfortunately, after testing and delivering the real email after registration here: hidden link, the text in the email is still in the original language, i.e. Czech. It is important to mention that 2 emails are sent after registration. The first one arrives immediately after registration automatically. This email is fine and translated into the desired language, English. The second one will arrive only after we manually approve the user in WordPress in the user administration. This second email, however, will arrive in Czech instead of English.
At the same time, I later tried one more thing. I switched the WPML switch in the WordPress administration to English and edited the text directly in the WP Forms administration. The form has a different ID, so I assume that I am editing the English version directly. Even though I have English text in my WP forms settings, the email still shows Czech.
I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)
**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **
I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.
NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.
Am I able to do a test purchase in order to send out the email?
You also mentioned the following.
"The second one will arrive only after we manually approve the user in WordPress in the user administration. This second email, however, will arrive in Czech instead of English."
When you manually approve the order -- what language are you using in the backend? What are your results if you switch to the desired language and then approve it, does that make a difference here?
The website is on a live domain, but it is still under development and not accessible to the public, so you can do any tests you want. You can do registration here: hidden link and after that manually approve the user from admin profile in users - Please, see screenshot.
To clarify and answer your question: I also tried all this before approving the user
Change language to English in backend with WPML language switcher on the top bar.
Change the default language of the user administrator profile "hones" from which the user is approved to English.
Change the default language in WordPress in the WPML settings to English.
None of these settings helped, the confirmation email is still in Czech. Now all the above settings are in their original state.
I have a theory on what is happening now, thank you!
When a user registers the email is sent based on the language that was used to register.
The account created, is set to use "default " language, which would be Czech.
When you approve the email manually it sends based on the user's profile language.
Since the language is set to 'default' it sends in the default language of the site.
I would like to further investigate this. Where can I add this email or customize it in the backend? When I review the WP Form I am not able to locate it.
thanks for insight. You can edit message or template of email in specific WP Forms Form. Choose form "Register" in forms list (ID 881) --> click on "Settings or nastavení" on left side --> click on "user registration" -->scroll down --> click on "edit template" next to "Email the user once their account has been activated." There you can edit that message which cant be translated from czech into english. - See attached screenshot.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello,
My colleague Bobby is on vacation which is why I am assisting you today.
According to Bobby's last comment he was suspecting that the issue is that the user locale is not set in the moment the user is registering on the site.
This snippet will set the user's locale based on the current active language.
Please implement the snippet and test by registering a new user. Please make sure to let me know if this snippet solved the issue or not.
---
Important, when reporting an issue please always make sure all plugins remain updated and test if the issue persists while using the latest versions of all plugins.
I tried to add snippet via Code Snippets plugin and it seems snippet is working as expected. The default languange of user is English after registration. But unfortunately, the confirmation email after account activation is still in Czech instead of English.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
I suspect that the confirmation email after account activation will be triggered by an admin who activates the account on wp-admin and this is causing a conflict between the current admin language and the actual user language.
I will set up a test site with WPML and WPForms and test if I can recreate this issue and then get back to you.
I updated WPforms to latest version (1.9.5.2), tested registration of new user and approved the user. Snippet is active, user profile languange is in English, but email is still in Czech.
thanks for the tip. I've tried this before, it didn't have any effect. Now I've tried it again and still nothing. Even though I have the administrator language set to English when confirming users and even though I have it as "Default". Unfortunately the email sent from WP Forms is still in Czech. It's really a big mystery. Don't the WP forms developers have any information about this? Unfortunately it's important for us to confirm the user manually, I didn't expect there to be such a problem and although it may seem like a trivial problem, I would need to solve it somehow. 🙁