Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 -
- 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 -

Supporter timezone: Asia/Dhaka (GMT+06:00)

This topic contains 7 replies, has 2 voices.

Last updated by Prosenjit Barman 11 months, 3 weeks ago.

Assisted by: Prosenjit Barman.

Author Posts
June 11, 2024 at 8:49 pm #15729007

joeyT-4

Tell us what you are trying to do?

We are sending a page for translations to our vendor. The delivered file is not being read and translated correctly. Fields marked as translatable are not being detected, and HTML fields that are marked as not translatable are being detected.

Is there any documentation that you are following?

Yes, our developers have looked through online WPML documentation.

Is there a similar example that we can see?

In the .xliff file, we can see HTML being picked up for <source> when it should not be. In other instances, text that should be picked up for translation is not being detected at all.

What is the link to your site?

Example page where this issue is occuring during our test: hidden link

June 12, 2024 at 6:06 am #15729493

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're experiencing. If the translation preference is set to 'Not Translatable,' the field data should not be included in the XLIFF file. Only the field set to 'Translatable' should be included in the XLIFF.

While checking the WPML debug info, I noticed that the ACF Multilingual, WPML, and String Translation plugins are not updated to their latest versions. Specifically, the version of the ACF Multilingual plugin installed on your site is quite old.

Please update the ACF Multilingual, WPML, and String Translation plugins to their latest versions (ACF Multilingual → 2.1.3, WPML → 4.6.10, String Translation → 3.2.12).

After updating, change the field group setting to 'Expert' and set the translation preference for the fields you want to include in the XLIFF file to 'Translate'. Once done, make a small change in the page or post to apply the changes. Then try to create the XLIFF file again.

To understand the process of changing the translation preference of the Field group and the fields within it, please check this guide: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/expert-translation-option/

I hope the information above will help. But, feel free to let me know if you need further assistance in this matter. I will be happy to help.

Best regards,
Prosenjit

June 14, 2024 at 3:50 pm #15740876

joeyT-4

Hi, in the past 2 days we have made sure to try out everything before getting back to this question. We have now update the plugins to the following versions:

Advanced Custom Fields Multilingual 2.1.3
WPML Multilingual CMS 4.6.11
WPML SEO 2.1.0
WPML String Translation 3.2.12

We are also using the following setup with ACF fields:

{
"key": "group_64132a6680434",
"title": "Block: ITBL New Content With Stats Block",
"fields": [
{
"key": "field_64132a75c4b54",
"label": "Title",
"name": "title",
"aria-label": "",
"type": "group",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"layout": "block",
"wpml_cf_preferences": 1,
"sub_fields": [
{
"key": "field_64132a81c4b55",
"label": "Title",
"name": "title",
"aria-label": "",
"type": "clone",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"clone": [
"group_64075a8e80b8b"
],
"display": "seamless",
"layout": "block",
"prefix_label": 0,
"prefix_name": 0,
"wpml_cf_preferences": 1
}
]
},
{
"key": "field_64132aa6c4b56",
"label": "Text",
"name": "text",
"aria-label": "",
"type": "wysiwyg",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"tabs": "all",
"toolbar": "full",
"media_upload": 1,
"delay": 0,
"wpml_cf_preferences": 2
},
{
"key": "field_64132ac0c4b57",
"label": "Buttons",
"name": "buttons",
"aria-label": "",
"type": "group",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"layout": "block",
"wpml_cf_preferences": 1,
"sub_fields": [
{
"key": "field_64132acbc4b58",
"label": "Buttons",
"name": "buttons",
"aria-label": "",
"type": "clone",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"clone": [
"group_6401d71288c9f"
],
"display": "seamless",
"layout": "block",
"prefix_label": 0,
"prefix_name": 0,
"wpml_cf_preferences": 1
}
]
},
{
"key": "field_64132b41c4b5a",
"label": "Stats",
"name": "stats",
"aria-label": "",
"type": "repeater",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"collapsed": "",
"min": 3,
"max": 3,
"layout": "table",
"button_label": "Add Row",
"rows_per_page": 20,
"wpml_cf_preferences": 1,
"sub_fields": [
{
"key": "field_64132b54c4b5b",
"label": "Number",
"name": "number",
"aria-label": "",
"type": "number",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"min": "",
"max": "",
"step": "",
"parent_repeater": "field_64132b41c4b5a"
},
{
"key": "field_64132b5ec4b5c",
"label": "Text",
"name": "text",
"aria-label": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"parent_repeater": "field_64132b41c4b5a"
}
]
},
{
"key": "field_64132b91c4b5d",
"label": "Stats Message",
"name": "stats_message",
"aria-label": "",
"type": "textarea",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"maxlength": "",
"rows": "",
"new_lines": "",
"wpml_cf_preferences": 2
}
],
"location": [
[
{
"param": "block",
"operator": "==",
"value": "acf\/itbl-new-content-with-stats-block"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": "",
"active": true,
"description": "",
"show_in_rest": 0,
"acfml_field_group_mode": "advanced",
"modified": 1717409024
}

and

{
"key": "group_64075a8e80b8b",
"title": "Component: Title",
"fields": [
{
"key": "field_64075b7849bf4",
"label": "Title",
"name": "title",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"aria-label": "",
"wpml_cf_preferences": 0,
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_64b958eea8ac8",
"label": "Separate mobile title",
"name": "separate_mobile_title",
"type": "true_false",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "10",
"class": "",
"id": ""
},
"message": "",
"default_value": 0,
"ui": 0,
"ui_on_text": "",
"ui_off_text": ""
},
{
"key": "field_64b9593fa8ac9",
"label": "Mobile title",
"name": "mobile_title",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": [
[
{
"field": "field_64b958eea8ac8",
"operator": "==",
"value": "1"
}
]
],
"wrapper": {
"width": "90",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": ""
},
{
"key": "field_64075c6b9c903",
"label": "Settings",
"name": "",
"type": "accordion",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"aria-label": "",
"open": 0,
"multi_expand": 0,
"endpoint": 0,
"wpml_cf_preferences": 0
},
{
"key": "field_64075ace49bf3",
"label": "Title Tag",
"name": "title_tag",
"type": "select",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "33",
"class": "",
"id": ""
},
"aria-label": "",
"wpml_cf_preferences": 1,
"choices": {
"h1": "H1",
"h2": "H2",
"h3": "H3",
"h4": "H4",
"h5": "H5",
"h6": "H6"
},
"default_value": "h2",
"allow_null": 0,
"multiple": 0,
"ui": 0,
"return_format": "value",
"ajax": 0,
"placeholder": ""
},
{
"key": "field_640f189a2a5f6",
"label": "Title Alignment",
"name": "title_alignment",
"type": "select",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "33",
"class": "",
"id": ""
},
"aria-label": "",
"wpml_cf_preferences": 0,
"choices": {
"left": "Left",
"center": "Center",
"right": "Right"
},
"default_value": "left",
"allow_null": 0,
"multiple": 0,
"ui": 0,
"return_format": "value",
"ajax": 0,
"placeholder": ""
},
{
"key": "field_64075c759c904",
"label": "Eyebrow Dots",
"name": "eyebrow_dots",
"type": "true_false",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "33",
"class": "",
"id": ""
},
"aria-label": "",
"wpml_cf_preferences": 0,
"message": "",
"default_value": 0,
"ui": 1,
"ui_on_text": "Show",
"ui_off_text": "Hide"
},
{
"key": "field_64075db80cf33",
"label": "White Title",
"name": "white_title",
"type": "true_false",
"instructions": "By default, title is black. Set this to 'yes' if you want it to be white.",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "33",
"class": "",
"id": ""
},
"aria-label": "",
"wpml_cf_preferences": 0,
"message": "",
"default_value": 0,
"ui": 1,
"ui_on_text": "",
"ui_off_text": ""
},
{
"key": "field_64368b5ba7210",
"label": "Bottom Margin",
"name": "bottom_margin",
"type": "select",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "33",
"class": "",
"id": ""
},
"aria-label": "",
"choices": [
"None",
"Small",
"Medium",
"Medim-Large",
"Large",
"Extra Large",
"Extra-extra Large"
],
"default_value": 2,
"allow_null": 0,
"multiple": 0,
"ui": 0,
"return_format": "value",
"wpml_cf_preferences": 0,
"ajax": 0,
"placeholder": ""
}
],
"location": [
[
{
"param": "post_type",
"operator": "==",
"value": "post"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": "",
"active": false,
"description": "",
"show_in_rest": 0,
"modified": 1703612375,
"acfml_field_group_mode": "advanced"
}

What we expect to happen is that the fields inside this block appear as they are configured. Meaning: If the field has wpml_cf_preferences: 1, it should not appear in the translation export or the editor because it is marked as "Copy" and we want the fields that are set as wpml_cf_preferences: 2 to appear in the translations. For some fields this works and we can change their translation status, but some other fields, regardless of what we set as the configuration, do not appear in the translation or cannot be disabled in the translation. Example of a field that we are currently testing is the field "field_64132aa6c4b56" above in the JSON. We have these configurations in our staging environment, but the field does not appear in the editor. We will attach the translation editor screenshot.

Screenshot 2024-06-14 at 17.48.13.png
June 17, 2024 at 3:42 am #15743160

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
I hope you're doing well. Sorry for the delay in responding due to the weekend.

Thank you for providing more details about the issue. I see that the translation preference for certain fields is set to 2, which means they are translatable. Therefore, the field data should appear in the translation editor. However, could you please share the translation option set for the field group under which these fields are located?

You can navigate to "ACF → Field Groups," open the field group, and at the top, you'll see a banner to set the translation option for the field group.

If it's set to anything other than 'Expert,' please switch to the 'Expert' option and then check again. The ACF fields can only be set to translatable with the "Expert" option selected.

Please let me know the update. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

June 18, 2024 at 8:21 am #15747804

joeyT-4

Hi,

Thank you very much for the help. If you pay close attention in the JSONs you will see that both ACFs have `"acfml_field_group_mode": "advanced"`. Shouldn't this mean that the expert button was clicked?

We have tried clicking the button directly in the dashboard on our local development machines. But we have not clicked any buttons in the staging environment. Instead, we have just uploaded the ACF JSONs to staging. (We are versioning the ACF files as JSONs they cannot be found in the database, because we don't sync them once we upload them. They are purely saved in the ACFs.) We would also like to keep it that way if possible.

June 19, 2024 at 3:41 am #15751994

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for the update.

I understand your requirements. If the key acfml_field_group_mode is included in the JSON, the translation mode for the field group should adjust accordingly. However, instead of setting the mode to 'advanced' in the JSON file, could you please set it to translation and check if this changes the result? You may need to make a small change in the default contents and then recreate the XLIFF file.

You also mentioned that in the local development environment, you changed the translation mode for the field group from the ACF Dashboard. Could you let me know if that made any difference in the result?

Please let me know the update. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

June 19, 2024 at 11:31 pm #15758956

joeyT-4

We have tried this. It did not work. The results are still the same. Some fields just don't appear in the translation whatever we try.

June 20, 2024 at 8:34 am #15762099

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for trying out the suggestions.

As the issue persists, I kindly request you try replicating the issue in our sandbox environment. This will help us easily isolate the problem in this minimal setup. In this way, we can also easily escalate the issue to our developers if required. The autologin link to our sandbox is provided below.

- hidden link

WPML and its add-ons are already installed in the sandbox. Please install ACF and any other plugins needed to recreate the issue. Set up the plugins as they are on your site and try to replicate the issue. If you need to access the files(to store ACF JSON files), you can use the "File Manager" plugin installed in the sandbox.

Please let me know if you're able to replicate the issue in the sandbox. I will take a closer look and be happy to assist you further.

Thank you for your kind cooperation in this matter.

Best regards,
Prosenjit

The topic ‘[Closed] ACF settings are not being picked up correctly in .xliff file’ is closed to new replies.