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.
Tagged: Compatibility
This topic contains 18 replies, has 2 voices.
Last updated by Bobby 2 weeks, 4 days ago.
Assisted by: Bobby.
Author | Posts |
---|---|
September 11, 2024 at 9:47 am #16165512 | |
sajaZ |
Background of the issue: Symptoms: Questions: |
September 11, 2024 at 11:09 pm #16168312 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Hi there, I believe that is expected behavior, the email notifications send to the admin will be in the default language and will not change based on the language the form was included in. Regarding to the emails you send to the users, you should be able to translate all through WPML->String Translation. Let me know your results, please. |
September 12, 2024 at 9:02 am #16169674 | |
sajaZ |
the email notification that is sent to users is not translated, for the admin its All fields so doesn't need to be translated |
September 13, 2024 at 12:55 am #16173782 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Thank you for confirming. Go to WPML → Theme and plugins localization. Once finished go to WPML → String Translation. Let me know your results, please. |
September 13, 2024 at 1:14 pm #16175637 | |
sajaZ |
I appreciate your help. I already have the forms translated, and I checked the steps in the documentation on how to translate them and as you can see in the screenshot the translation says Completed. I translated the field titles and it shows in Arabic, I translated the emails but I receive it only in English as the User who submits the form, either logged in or out. |
September 13, 2024 at 7:30 pm #16177612 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
I would like to request temporary access (wp-admin and FTP) to your site to test the issue. **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/ 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. Thank you, |
September 16, 2024 at 7:03 pm #16185364 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Thank you for providing the access details! Here’s what I’ve done: Verified the Email Confirmation: I checked that the email confirmation is correctly translated. NOTE: I am deactivating the plugin now for email logging 'WP Mail Logging', feel free to re-activate it if you would like to perform the same test. |
September 17, 2024 at 8:46 am #16186873 | |
sajaZ |
Thank you so much for taking the time and testing it. this might seem crazy but it's not working, I tested it twice from logged in account and from incognito, I am already using WP SMTP for emails logging, but I thought it might be the email log plugin you used that made it work, so I tried again with the WP Mail Logging and still got English emails. I don't understand how it worked with you, I submitted tons of times and I was always getting English emails. |
September 18, 2024 at 5:20 am #16191025 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Interesting behavior, I did the same thing once again, except this time I used my work email and I received it in AR. See screenshot. 1. I visit hidden link What are your results if you test from a different browser or computer? For example your phone or a laptop? |
September 18, 2024 at 10:17 am #16192258 | |
sajaZ |
after doing some testing, if the email is not registered on the website it is receiving the right language, but if the email is registered on the website, its getting the English email always when I checked, most users have this Site Language as English in their profile. |
September 18, 2024 at 6:01 pm #16194973 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Hi there, Thank you for sharing this information! That makes sense as when sending emails to registered WordPress users, the language used is the user's preferred language based on what they set it as within their User Profile. You can inform your users that they can set their preferred language in the WordPress admin under Profiles->Your profile. As this is expected WordPress behavior, you might be able to create some custom work that would overwrite it, I'd suggest reviewing this hook that could possibly help. |
September 19, 2024 at 7:43 am #16196376 | |
sajaZ |
Thank you but this doesn’t make any sense, as in woocommerce, events and even membership the emails will be sent depending on the page language you submitted from, so I expect the forms to be like that too. |
September 19, 2024 at 11:13 am #16198138 | |
sajaZ |
// Global variable to store the form language // Step 1: Store the form submission language after the form is submitted // Get the language code of the form using WPML // Store the form language in a global variable // Step 2: Use the wpml_switch_language_for_email hook to switch the email language // Check if the form language is set it didn't work also |
September 20, 2024 at 7:09 pm #16203971 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Thank you for updating me! This is a known and expected behavior of WordPress as it will always prioritize the user's selected language in their profile. If a user is registered they can edit this on their own. However, I am checking in with my team further and will update you once I have some feedback. |
September 21, 2024 at 1:03 pm #16204875 | |
sajaZ |
thank you, but this behavior only affects Gravity Forms and it's recently only started to happen as before if I submitted from the Arabic website I used to get Arabic emails which now I don't. I would appreciate your help with the function that would make it possible to send the email responses depending on the language the user submitted not his profile language. |