Home›Support›English Support›[Waiting for user feedback] Theme-Options strings (emails + frontend texts) force the back-end into the wrong language and email...
[Waiting for user feedback] Theme-Options strings (emails + frontend texts) force the back-end into the wrong language and email...
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 am trying to translate every Theme Options string so that on the frontend, the visitor sees the texts in the language they selected (EN, PT, or ES). I also want every email to be sent in the correct language and keep the WordPress admin dashboard permanently in English. I followed the WPML guide for multilingual emails: https://wpml.org/documentation/support/sending-emails-with-wpml/. I verified the mail function calls: do_action('wpml_switch_language_for_email', $to); wp_mail($to, $subject, $body, $headers); do_action('wpml_reset_language_after_mailing'). The issue can be seen here: hidden link.
Symptoms:
All Theme-Options strings are registered under the domain admin_texts_jws_option. When I translate a string, WPML switches the entire admin UI to the language of the first front-end visitor and keeps it that way. Every subsequent email is sent in that same forced language, ignoring each user’s preferred language. Frontend texts may appear translated, but the admin locale is wrong. Emails are never sent in the correct user language—only in the forced admin language.
Questions:
How can I ensure that the admin interface remains in English regardless of the visitor's language?
How can I make sure that emails are sent in the correct user's language instead of the forced admin language?
I was able to understand the issue, checking the example you shared in the video. To test if this is a compatibility issue between the child theme custom implementation and WPML, I've created a test environment for us:
hidden link
You can access it by clicking on the link above. The idea is to check how the theme behaves with WPML, in isolation, with no external influences (like other plugins or content). The environment is set in EN as default and ES as secondary, which is enough.
Please install your theme and try to recreate the issue there. Don't forget to add related custom code (if there's any). Let me know how it goes or if you have any questions.
The idea here is to check the theme and its customizations in isolation, so please do not create a copy of the entire website there. Creating a copy is actually the opposite of what we want.
Please recreate your issue, using only your theme and other plugins that are directly related to the email issue you brought. If there are no plugins related to the feature that presents the issue, don't install any. By checking your theme in isolation, I can understand if the issue is being caused by the customizations, or by something else. Let me know your results.
It seems to me that you haven't reproduced the issue exactly as it is on the live website, on the sandbox. The theme that has the customizations "LoveDate Child" is not installed in the Sandbox. Since we don't know exactly what's causing the behavior, I need to check the issue itself, not something similar to it.
I need to look at the exact code, in the very same exact theme that you're using on your live website. Please follow these instructions exactly as they're here:
1. Log into to your hosting and access your file manager;
2. Create a zip of your Parent theme (LoveDate), in wp-content/themes/;
3. Create a zip of your Child theme (LoveDate Child), in wp-content/themes/;
4. Download the zip files (which are the themes themselves);
5. In the sandbox, go to Appearance > Themes > Add New and upload the zip file for the parent theme;
6. In the sandbox, go to Appearance > Themes > Add New and upload the zip file for the chilf theme;
7. Activate the child theme
8. Recreate the issue of the page you showed in the first video (check image attached). Let me know how it behaves.
I will focus only on this issue at the moment (not on the email one). They're likely related - I will confirm about the email later. Please follow the steps exactly as they're listed above. Avoid trying to interpret what I'm sending in other ways other than what's explicitly written in the instructions, to avoid misunderstandings. Thank you.