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: Language Switcher, Media Translation
Related documentation:
This topic contains 33 replies, has 3 voices.
Last updated by Ahmed Ibrahim 3 years, 10 months ago.
Assigned support staff: Ahmed Ibrahim.
Author | Posts |
---|---|
March 28, 2017 at 12:09 pm #1241311 | |
desireeM |
I am trying to: to send the a string (messages) in email which should be automatically changes according to customer language for this i used as suggest https://wpml.org/documentation/support/sending-emails-with-wpml/ i am using in email like do_action('wpml_switch_language_for_email', $order->billing_email); printf( __( 'Mirror, mirror on the wall, who has the cutest look of them all?', 'customnew' )); echo $sitepress->get_admin_language(); do_action('wpml_restore_language_from_email'); echo $sitepress->get_admin_language(); As i check this action are switching the language of admin from English to chiness code and vice versa successfully but it not changing the string message and yes i already add string of translation for that string you can see in this image and here the image where you can see that switching is working fine hidden link URL of (my) website where problem appears: hidden link I expected to see: the result string translation in email in chines language |
March 29, 2017 at 8:02 am #1242021 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi , Thank you for contacting the WPML support. We are happy to help you. Please let me know the exact steps to replicate the issue in a fresh installation. Are you using a custom theme? I have a request. Please upgrade to the latest version of WordPress, WooCommerce, and WPML Media, after a full site backup and check you are still having the issues. -- Bigul |
March 29, 2017 at 12:07 pm #1242310 | |
desireeM |
i try same code with all latest plugins/theme/ wordpress but still i have same issue |
March 30, 2017 at 4:56 am #1242891 | |
desireeM |
steps i followed 2. than i set two languages 1. English 2. chines 3. than i do all steps what they recommended me to do 4. than i have a string which i register a required string(Mirror, mirror on the wall, who has the cutest look of them all?) to string translation and than i add translation of that chiness i that 5. than i add this string to my woocmerce processing email "Mirror, mirror on the wall, who has the cutest look of them all?" than i do a new order using a customer account which have chines language than the email goes to that customer is chiness language and this string "Mirror, mirror on the wall, who has the cutest look of them all?" is also there in chines language 6. Than i try to send the a email to customer which is a promotional email in functions.php of my theme where i pass a messge "Mirror, mirror on the wall, who has the cutest look of them all?" as i check language is switch successfully using code do_action('wpml_switch_language_for_email', $order->billing_email); printf( __( 'Mirror, mirror on the wall, who has the cutest look of them all?', 'customnew' )); echo $sitepress->get_admin_language(); do_action('wpml_restore_language_from_email'); and email is also delivery to customer succefully but the string "Mirror, mirror on the wall, who has the cutest look of them all?" in that promotional email not translate to chiness language string that is the issue i have facing in new installation also SO please help me bigul as soon as possible regards |
March 30, 2017 at 7:40 am #1242990 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, Thank you for the details. I tried the steps locally and was unable to replicate the issue exactly. Therefore I would like to access admin area of your site for further checking. Please fill the private details fields after a full site backup. Check the following links for more details about private information sharing. hidden link Please allow me to make a duplicator copy of your site using Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue locally. Would like to know one more thing. How you are sending the Promotional mail to the customer from the Dashboard(Step 6 of the previous reply). -- Bigul |
March 30, 2017 at 2:47 pm #1243537 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, Thank you for the login details. But I am facing a couple of issues. 1) Unable to create a duplicator package, because *Zip Archive* is not enabled. Please enable it and check the attached image for more details. 2) Please give me the permission to install Translation Management and configure WooCommerce Multilingual for running some tests. I will work more on this in my local and update you by tomorrow. Please wait. -- Bigul |
March 30, 2017 at 4:15 pm #1243613 | |
desireeM |
how can give permission of zip things i dont know where to enabled this ?? 2. yes you can install any plugin for your testing |
March 31, 2017 at 4:09 am #1243909 | |
desireeM |
ok i enabled the *Zip Archive* . now you can use "create a duplicator package" plugin regards |
March 31, 2017 at 6:02 am #1243950 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, Thank you for the updates. I am working on it and get back to you soon. Please wait. -- Bigul |
March 31, 2017 at 7:39 am #1244021 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi, For your updates, I have tried few tests, and the translations are showing for me in the order receipt mail. The changes I made in *customer-processing-order.php* file also showing the order receipt mail. Please check the attached images and let me know your feedback. -- Bigul |
March 31, 2017 at 10:36 am #1244204 | |
desireeM |
HI no bigul this things already switch automatically when you do an order but we need send emails manually so i create a link for you when you click this link it will send you email where you can check effects hidden link and wp_mail so send manually email i create function for in functions.php hidden link So please change your email in funcitions.php and test the transnational things than you will notice the actually issue In manually emails language is not switch. If you did not receive email than please tell me so that i can create a testing email id for you and share password to you regards |
March 31, 2017 at 3:13 pm #1244508 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi , Thank you for the updates. I would like to confirm one thing. Please try the following steps and let me know your feedback. Check the attached image for more details. 1) Switch Dashboard Language to Chinese I also have a request. Can you please create a staging environment of your live site. So we can test the actual functionality also. Please share me your suggestion. -- Bigul |
March 31, 2017 at 4:53 pm #1244626 | |
desireeM |
But we are not always switch back to chines or English because in our website we re running 10+ multiple language our website Thats why we want to send emails on one click (manual email) and our live website are still running on old versions of wpml and we will plan to update to those on next months thats why i give you setup of all latest plugin on our that staging website you currently working. So please make sure that if we are on english dashboard it must be send the message to as customer languge not in english which is wrong and the action which wpml provide have bug if this is not satisfy them regards |
April 3, 2017 at 4:16 am #1245301 | |
desireeM |
1) we are sending mail with cron Regards |
April 3, 2017 at 11:28 am #1245663 | |
Bigul Supporter
Languages: English (English ) Timezone: Asia/Kolkata (GMT+05:30) |
Hi , Thank you for the updates. It looks like a custom development requirements. I am looking for an option to get the user language. Therefore I have two more questions. 1) What all are the information you are sending to client while sending the mail from the live environment. Please explain more about it. 2) Does the mail contents related to WooCommerce Order details? How you defer the Customer languages? -- Bigul |
The topic ‘[Closed] help to wpml switch language for email actions’ is closed to new replies.