This thread is resolved. Here is a description of the problem and solution.
Problem: The client is setting up options pages to be translated using WPML and is experiencing issues where switching languages via the language switcher in the admin bar does not update the options page as expected. For example, changing the language to Chinese, saving the options page, and then switching back to English shows the same content as saved in Chinese. The fields in ACF are set to be translated, but they do not change language. Solution: We recommend the following steps to address the issue: 1. Go to WPML > Settings and scroll to the Custom Field Translation section. 2. Click on the Show system fields link. 3. Once the page is refreshed, enter the field name in the search box within the Custom Field Translation section. For example:
archive_heading_text
. 4. In the results, the field should appear twice, with one name starting with an underscore (e.g.,
_archive_heading_text
). Set the translation preference for that field to Translate. 5. Save the changes and then go to the options page and try updating the translation by switching the language.
If this solution does not resolve your issue or seems irrelevant due to updates or different configurations, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum.
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.
Symptoms:
When using the language switcher in the top admin bar, switching languages does not update the options page as expected. For example, changing the language to Chinese, saving the options page, and then switching back to English shows the same content as saved in Chinese. My guess is that the fields are never changing language. The fields in ACF are set to be translated.
Questions:
Am I missing a step in setting up the language switcher for the options pages?
Is there a specific configuration or setting required in WPML to ensure the options page content updates correctly when switching languages?
I understand the issue you're having. Since the translation preference for the field is set to "Translate," the field data shouldn't be synced. However, when I checked the WPML Debug info, I found that while the main ACF field is set to "Translate," the system ACF fields are set to "Copy." This discrepancy could be the reason for the issue.
Please try the following steps:
1. Go to "WPML > Settings" and scroll to the "Custom Field Translation" section.
2. Click on the "Show system fields" link.
3. Once the page is refreshed, enter the field name in the search box within the "Custom Field Translation" section. For example: `archive_heading_text`.
4. In the results, the field should appear twice, with one name starting with an underscore (e.g., `_archive_heading_text`). Make sure to set the translation preference for that field to "Translate."
5. Save the changes.
6. Then go to the options page and try updating the translation by switching the language.
Please give it a try and let me know how it goes. I will be happy to help if you need further assistance in this matter.
Neither "_archive_heading_text" or "archive_heading_text" appear in the custom field translations appear in the "Custom Fields Translation" section with Show system fields toggled on. See attached screenshots for full list of fields.
The WPML debug info of your site shows the fields, but for some reason, they are not appearing in the list. To understand the root cause, a closer inspection will be required.
I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.
You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.
IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link
Hello There,
Thank you for sharing the access information.
I have thoroughly checked and can see that the field name is not showing in the list. Additionally, changing the translation preference of the field group or the fields within it has no impact on the option page.
I have also checked the JSON file, and the configuration is correct there. Could you please share if you have taken any other approach to create the ACF fields or if the fields are synchronized in any other way?
Please also share how the Option page is created. In the ACF option page, I haven't noticed any option page created for the events post type.
This information will help further investigate and might assist in resolving the issue. Looking forward to your response.
In terms of how our ACF is set up, I am using ACF JSON sync, but that is a feature that allows you to sync files with what is on the site. It shouldn't effect the ability to make changes to the ACF fields and have it directly effect the site when you save the changes. I am also creating the options pages via the acf_add_options_page() and acf_add_options_sub_page(). For example:
These are being added in the theme in inc/acf-customizations.php.
This has my brain thinking - I wonder if it might be due to the post_id? I took a look at the Site Options page and it looks like those fields are working (they are showing correctly as locked in Chinese).
Seems like this outlines my issue, which is the post_id. Obviously I will need to work around this now, but do you have any idea why this is such an issue? I will have to rework 9 options pages and their associated fields in order to fix this.
Hi There,
I hope you're doing well. Sorry for the delay in responding due to the weekend.
Thank you for debugging further and sharing the updates. The ACF JSON support is included in the ACFML plugin. However, you're right! The issue with the field was caused due to the post_id.
In the ACFML plugin, we have set "options" as the default variable. However, in ACF v5.2.7, the custom 'post_id' feature was introduced, but the capability to handle custom post_id has not yet been added to ACFML. Therefore, if you use a custom post ID other than the default 'options', the translation preferences for the fields within the options page will stop working.
Our dev team is already aware of the issue, and we are planning to add support in the upcoming version of the ACFML plugin. However, I don't have an ETA on when the version will be released. For now, you can follow the workaround mentioned in this Errata.
I'm also adding this issue to our development ticket to increase its priority. If there are any updates, I will surely inform you.
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.