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 21 replies, has 2 voices.
Last updated by chrisL-17 1 year, 10 months ago.
Assisted by: Osama Mersal.
Author | Posts |
---|---|
March 22, 2023 at 6:38 pm #13308189 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for your patience. Our compatibility team found a workaround for the issue. Please check the following steps. 1- Edit the (/wp-content/plugins/indeed-membership-pro/public/views/listing_users-filter.php) file <?php echo ihc_correct_text($v);?> With the following code <?php // WPML Workaround for compsupp-6688 if (class_exists('SitePress')) { do_action('wpml_register_single_string', 'ihc_user_fields', 'ihc_user_fields[' . $v . ']', $v); $v = apply_filters('wpml_translate_single_string', $v, 'ihc_user_fields', 'ihc_user_fields[' . $v . ']'); } ?> <?php echo ihc_correct_text($v);?> 3- Visit the page in the default language on the front end I've applied the above steps to the sandbox site. Please check the page and let me know if the strings are translated correctly. (hidden link) I hope this helps you. If you need further info, please let me know. Best regards, |
March 23, 2023 at 1:19 pm #13315501 | |
chrisL-17 |
I realize this is turning into quite the chore for you and your team, especially since it's not WPML's fault that UMP's support for string translation is incomplete. I apologize. I will be bringing this up with their developers. The workaround you supplied works for the various checkbox select options (except for the default 'All' choice). And some other strings (select option labels) don't need the workaround. This is a huge relief. But there are still other strings on this page that aren't available to string translation ('Search' and 'Reset'), and other strings that aren't part of the ihc_user_fields domain that have the same problem: they 'disappear' when translated. The names of the Canadian Provinces (British Colombia should be Colombie Britannique). They all seem to be rendered by that plugin file. Is there a way to apply the work-around to them? |
March 23, 2023 at 2:10 pm #13316035 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for your reply. The ('Search' and 'Reset') buttons can be found under the "ihc" domain. (hidden link) I translated them on the sandbox site, and they are translated correctly. Kindly check them here. (hidden link) Best regards, |
March 23, 2023 at 2:58 pm #13316467 | |
chrisL-17 |
That is awesome. So now there just remains the province names, created on the sandbox as a custom field called 'province'. I can't find the strings for the form select options in either ihc or ihc_user_fields. I see them in admin_texts_ihc_user_fields but if I translate those, then they disappear from the directory. |
March 23, 2023 at 3:11 pm #13316533 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, I'm not sure why the select field is not working as the checkbox field, so I'll consult our compatibility team regarding this and update you as soon as I get their reply. Best regards, |
March 27, 2023 at 5:19 pm #13341581 | |
Osama Mersal Supporter
Languages: English (English ) Arabic (العربية ) Timezone: Africa/Cairo (GMT+02:00) |
Hi, Thanks for your patience. Our compatibility team has found a workaround, but you need to contact the plugin developers to implement a permanent workaround because each field type will need a workaround to fix the issue. Kindly check the following steps to fix the issue: foreach ($field['values'] as $k){ With the following code foreach ($field['values'] as $k) { // WPML Workaround for compsupp-6688 if (class_exists('SitePress')) { do_action('wpml_register_single_string', 'ihc_user_fields', 'ihc_user_select[' . $k . ']', $k); $k = apply_filters('wpml_translate_single_string', $k, 'ihc_user_fields', 'ihc_user_select[' . $k . ']'); 4- Go to WPML-> String Translation I've applied the above steps to the sandbox site. Please check the page and let me know if the strings are translated correctly. (hidden link) I hope this helps you. If you need further info, please let me know. Best regards, |
March 31, 2023 at 11:03 pm #13379319 | |
chrisL-17 |
I have sent the info to the UMP developers. I hope they do something with it, as it will be a drag to have to re-patch their plugin every time they update it. |