ข้ามไปยังเนื้อหาหลัก ข้ามไปยังแถบด้านข้าง

Open

Reported for: Advanced Custom Fields Multilingual 2.0.5

Topic Tags: ATE

Overview of the issue

When registering Advanced Custom Fields (ACF) via the acf_add_local_field_group() function in PHP, the layout fields within ACF, including repeater fields, are automatically set to Don’t translate. This setting disrupts the expected display of repeater fields on the front-end in translated content.

Workaround

Instead of registering fields directly in PHP, you can utilize ACF’s ability to save field group configurations as JSON files.

6 การตอบกลับ ถึง “Advanced Custom Fields - [Local Fields] Translation Preference Issue for PHP-Registered System Fields”

  1. Hi from version 2.1.4.2 user (released 2024-08-22).

    We built our custom fields using the acf_add_local_field_group() php function, to improve their reliability, and build them following the official WPML Advanced Custom Field Multilingual documentation:
    https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/setting-the-translation-preferences-for-acf-fields-created-using-php-code/

    Our php-created custom fields, while they are definitely registered:
    – Are not visible from the Advanced Custom Fields interface (this is problably not related to your plugin)
    – Are not findable from WPML > Settings > Advanced Custom Field Translation
    – Most of all, are not translated, even if the ‘wpml_cf_preferences’ => 2′ parameter is set
    – This is not restricted to repeater fields, but to all kind of custom fields

    Today I find out about this erratum.

    It’s been 21 month this issue is going on.

    Is there still no fix to be expected?
    Are you looking into it?

    How about, at least, modifying the official documentation to warn people about this issue, so that they don’t invest on some good practices which won’t work?

  2. Hi beloved WPML Team…

    we just noticed this strange behaviour as well on some of our lates client projects and on top on our own website.
    We really want to go with WPML but currently arent able to translate our sites into other languages. Fields won’t show up within advanced transaltion editor or for automatic translations. We wanted to avoid the manual translation process as much as possible ..

    When do you think this will be resolved? 😉

    Thank you beforehand
    Michael

    • Hi Michael,

      Thanks for reaching out! Unfortunately we don’t have an ETA yet.

      As a workaround, you can save your field group configurations as JSON files. This forum ticket might help. There is a link to a Github plugin that should convert your fields. Since it wasn’t developed by us, please test it on a staging site first.

      I hope it helps! Else, don’t hesitate to open a chat on our support forum, we will be happy to assis you further.

แสดงความคิดเห็น

โปรดอยู่ในหัวข้อและให้ความเคารพผู้อื่น หากคุณต้องการความช่วยเหลือในประเด็นที่ไม่เกี่ยวข้องกับโพสต์นี้ ให้ใช้ฟอรัมสนับสนุนของเราเพื่อเริ่มการแชทหรือส่งตั๋ว.

คุณสามารถใช้แท็กเหล่านี้:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>