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 5 replies, has 2 voices.
Last updated by Dražen 1 year, 3 months ago.
Assisted by: Dražen.
Author | Posts |
---|---|
September 25, 2023 at 2:04 pm #14459333 | |
lobkeB |
Hello, In the issue 'String translation automatic emails does not work correctly for 1 language' (marked as resolved), the supporter send me the following code: //WPML and Polylang integration But I don't understand how to place the code in the email.php file. The old file was: //WPML and Polylang integration I tried this: //WPML and Polylang integration But now the test email I send looks like this (see attachment). Can you help me? Best regards, Lobke |
September 26, 2023 at 8:23 am #14464287 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, since this is related to the ticket and the workaround I provided, I will be taking care of this. Please revert any changes you have made. - Go to this file \wp-content\plugins\customer-reviews-woocommerce\templates\email.php. - Open it and find the line where it says: //WPML and Polylang integration if ( has_filter( 'wpml_translate_single_string' ) && defined( 'ICL_LANGUAGE_CODE' ) && ICL_LANGUAGE_CODE && !function_exists( 'pll_current_language' ) && $ivole_language === 'WPML' ) { $wpml_current_language = strtolower( $lang ); - Replace it //WPML and Polylang integration if ( has_filter( 'wpml_translate_single_string' ) && defined( 'ICL_LANGUAGE_CODE' ) && ICL_LANGUAGE_CODE && !function_exists( 'pll_current_language' ) && $ivole_language === 'WPML' ) { global $sitepress; $wpmllangs = $sitepress->get_active_languages(); if (ctype_upper($lang) && (ctype_upper($wpmllangs[$lang]["code"]))){ $wpml_current_language = ( $lang ); } else { $wpml_current_language = strtolower( $lang ); } But please note as I said in the ticket, it might not work and this will probably not fix the issue for all languages, and you should contact the plugin author and report this issue an invite them to the GoGlobal program, to achieve better compatibility with plugin. So the best would be that approach and contact them, as there is not much we can help on our own in this case. We have also already contacted them, but have not received any reply, AFIK. Regards, |
September 26, 2023 at 9:14 am #14465125 | |
lobkeB |
Dear Drazen, Thank you for helping me out with this code. It must be related to the capital letters. It is not possible to change these CH en BE to lowercase ch en be somewhere in the core code? The only thing we could do is delete the entire CH en BE installation (the entire sites) and create new ones? Best regards, Lobke Buijs |
September 26, 2023 at 9:26 am #14465265 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello Lobke, glad to hear that. Yes, I am afraid it is not possible to change this easily, as the language code you set for these languages, is saved and added for all translated content etc. The only way would be to create a new language with different code. Regards, |
September 26, 2023 at 9:30 am #14465275 | |
lobkeB |
Ok, thank you very much for your help on this one. |
September 26, 2023 at 10:41 am #14465857 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hope so too. Feel free to contact us again if there is anything else we can do for you. Regards, |