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

Open

Topic Tags: Compatibility

Overview of the issue

When using SiteOrigin’s Layout Builder, there are issues with translating widgets that are duplicated both inside and outside the layout builder on the same page. As result, they are not translatable.

Workaround

Please, make sure of having a full backup of your site before proceeding.

  • Open …/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/SiteOrigin/TranslatableNodes.php file.
  • Look for line 142.
  • Change:
    1
    2
    3
    public function get_string_name( $node_id, $field, $settings ) {
            return $node_id . '-' . $settings[ self::SETTINGS_FIELD ]['id'] . '-' . $field['field'];
    }
  • For:
    1
    2
    3
    public function get_string_name( $node_id, $field, $settings ) {
        return $node_id . '-' . $settings[ self::SETTINGS_FIELD ]['widget_id'] . '-' . $field['field'];
    }
  • Do a small modification on the original page and save.
  • Update the translation.

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

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

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