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: Feature request
Author | Posts |
---|---|
August 22, 2025 at 6:10 pm #17341271 | |
krisztianG-2 |
Background of the issue: Symptoms: Questions: |
August 24, 2025 at 9:59 am #17343059 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, This is a feature request that our developers need to discuss whether to include in WPML's options. I've adjusted the filter function to match your case, as I assume it is about the 'property' post type. Please try to use it like this: add_filter('wpml_tm_job_field_is_translatable', 'testfield', 10, 2); function testfield($is_translatable, $job_translate){ global $wpdb; $postid = $wpdb->get_var( $wpdb->prepare("SELECT `field_data` FROM `wp_icl_translate` WHERE `field_type` = 'original_id' AND `job_id` = %d", $job_translate["job_id"] )); $posttype = get_post_type($postid); if ($job_translate["field_type"] == "title" && $posttype == "property") { return false; } else { return true; } }
|
August 24, 2025 at 11:27 am #17343099 | |
krisztianG-2 |
Hi, Thank you for the code, it is still not 100% We have for example 2 developments: Without your code PTC translated the name to: Google with you code translated it to: So I think the code needs some fine-tuning. Thank you! |
August 28, 2025 at 9:50 am #17354292 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, I apologize for the delayed response. According to one of our developers, here is an adjusted function. add_filter('wpml_tm_job_field_is_translatable', 'testfield', 10, 2); function testfield($is_translatable, $job_translate) { global $wpdb; $postid = $wpdb->get_var( $wpdb->prepare( "SELECT `field_data` FROM `wp_icl_translate` WHERE `field_type` = 'original_id' AND `job_id` = %d", $job_translate["job_id"] ) ); // Check if post ID is valid if ( ! $postid ) { return $is_translatable; } $posttype = get_post_type($postid); if ($job_translate["field_type"] == "title" && $posttype == "property") { return false; } return $is_translatable; } Does it meet your needs? Regards, |
August 28, 2025 at 10:50 pm #17356437 | |
krisztianG-2 |
Hi, unfortunately this does not work too. 'Navigolf Suites' has been translated to 'Navigolf lakosztályok' Is this method supported for all translation engines? I have tested it with Google. Thank you! |
August 31, 2025 at 8:56 pm #17360935 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, Could you please grant me access to your site and direct me to where I can view this issue? If you require additional assistance with this, please share the access details to your site with me. I'm enabling a private message for the following reply. |
September 1, 2025 at 6:18 am #17361211 | |
krisztianG-2 |
Dear Itamar, we couldn't wait any longer and after 2 non working suggestions we decided to build a custom plugin that translates the properties. You can close the ticket but keep it unresolved as the original problem is still there. We just do not need a solution for that anymore. WPML is a quite complex plugin I do not understand why your developers do not plan to implement such a basic feature. Thank you for all your efforts! Krisztián |
September 1, 2025 at 8:00 am #17361565 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi Krisztián. Thanks for updating me on this. I understand that you need this feature. I'm sorry that our suggestions didn't work for you, and you had to code a plugin for this. This issue has been escalated to our developers and tagged as a feature request. Only they and management have a broader view of things and prioritize feature development, among other things, upon demand. I have no option but to close the ticket without marking it as resolved. However, if you do not reply to this thread, our system will automatically close it after approximately one week. Regards, |