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: Documentation request
This topic contains 5 replies, has 0 voices.
Last updated by jeremiahH 1 week ago.
Assisted by: Otto.
Author | Posts |
---|---|
February 5, 2025 at 11:00 pm #16673174 | |
jeremiahH |
Background of the issue: Symptoms: Questions: |
February 6, 2025 at 12:57 pm #16675593 | |
Otto Supporter
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
The issue you are experiencing with Advanced Custom Fields (ACF) when using the acf-json feature might be related to WPML not properly saving translation preferences in the JSON files. Let's try a few things to narrow down the issue and solve it: 1. Check for the `wpml_cf_preferences` key in JSON files: { "key": "field_123456", "label": "Field Name", "name": "field_name", "type": "text", "wpml_cf_preferences": 2 } - Values for `wpml_cf_preferences`: 2. Sync the field groups after making changes: 3. Temporarily disable the `acf-json` feature: Users have reported that the ACF Local JSON feature can interfere with the translation of field labels when using WPML. Disabling this feature will allow the fields to be stored directly in the database, which can help determine if the issue is related to fields being loaded from JSON files instead of the database. Additionally, it's important to note that the ACF Local JSON feature does not generate separate JSON files for each language. This means that when distributing fields using acf-json, the fields for secondary languages may not be properly included, leading to translation issues. Therefore, temporarily disabling the acf-json feature can help identify if it's contributing to the problem you're experiencing with ACF fields not being recognized by WPML. For further details on ACF and WPML compatibility, check this documentation: ACFML 1.9 – Support for Importing and Exporting Translated Custom Fields Let me know if this points you in the right direction, please. Best Regards, |
February 6, 2025 at 5:32 pm #16676761 | |
jeremiahH |
We were playing around with the site and found that saving the page updated the word count. |
February 6, 2025 at 8:27 pm #16677220 | |
jeremiahH |
Hi, our ACF field values are now showing up in the translation file, however we are also getting the ACF field labels as separate strings. We have ACF Field Groups set as Not Translatable, but they are still being included. We do not want to include the labels for translation. How can we get these removed from translation? In WPML settings, I've confirmed all field groups in the ACF plugin are set to Not translatable and as well as in the WPML settings. (See screenshots). |
February 6, 2025 at 9:22 pm #16677382 | |
Otto Supporter
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, Thanks for the update. I am not sure I am getting the issue correctly, I need to take a deeper look. To do so, I created a fresh WP install with WPML and its add-ons and ACF Pro. You can log in to it by following this link: Can you please recreate the issue there? I think you'll need to upload your custom theme or at least import the acf-json file. Feel free to install anything else if it's needed to see the problem, but let's try to keep it to the bare minimum so it's easier to isolate the problem. Thanks for your cooperation! Best Regards, |
February 7, 2025 at 1:33 pm #16680048 | |
jeremiahH |
I'll try to be more clear on what the issue is. We submitted the homepage for translation from WPML to BLEND, the translation service we are using, and they were able to isolate the strings coming from WPML in the .xliff file and send over as spreadsheet. As you see in the screenshot, outlined in red, are the field labels for all of the ACF fields. We do not want these to be submitted in the .xliff file for translation. |
February 7, 2025 at 2:35 pm #16680215 | |
Otto Supporter
Languages: English (English ) Spanish (Español ) Timezone: America/Argentina/Buenos_Aires (GMT-03:00) |
Hello, Thanks for the explanation. If you don't want to translate the field labels, please include the following in your site's wp-config.php file: define( 'ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS', true ); References: Let me know if it helps, please. Best Regards, |
February 7, 2025 at 6:27 pm #16680838 | |
jeremiahH |
Thanks, Otto! That did the trick! Appreciate your help on this. |