Chuyển đến nội dung Chuyển đến thanh bên

Open

Reported for: WPML Multilingual CMS 4.7.6

Topic Tags: Bug, Compatibility

Overview of the issue

When translating a page created by Divi 5 and having a button with a dynamic link, you might encounter issues and it may break your page layout.

Workaround

At present you have two options:
– Convert the links to not dynamic links and they should work
Or
– Bypass their translation and use this wpml-config that you can place in WPML > Settings > Custom XML configuration:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="divi/button" translate="1">
            <key name="button">
                <key name="innerContent">
                    <key name="*">
                        <key name="value">
                            <key name="text" />
                        </key>
                    </key>
                    <key name="tablet">
                        <key name="value">
                            <key name="text" />
                        </key>
                    </key>
                    <key name="phone">
                        <key name="value">
                            <key name="text" />
                        </key>
                    </key>
                </key>
            </key>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

6 phản hồi đến “Divi 5 - Dynamic links added to a button may lead to improper translation”

  1. Thank you very much for your prompt response!

    I applied the configuration, but unfortunately, it didn’t help. And if we choose to convert the links to non-dynamic, it will greatly complicate our future work and increase the time it takes to maintain the site, since the dynamic links are linked to the date, 60 quantitative fields, and so on.

    Are there no other solutions to this problem? Is there a planned solution?

    • Hello,
      Sorry to hear you’re still experiencing issues.
      When you add the custom XML, it overrides the default configuration, and prevents the links from being translatable. Internal links should still be translated automatically by WPML, but external links won’t be translatable. Did you try making a minor change to the original page (like adding a space) and then revalidating the translation?

      That said, yes we do have a permanent fix planned for WPML 4.9, which is expected to be released by the end of this month (I don’t have aa exact ETA yet).

  2. The problem was that WPML couldn’t find the string we needed to translate, and when it did, the translation didn’t produce any results. Through trial and error, we figured it out and now understand what needs to be done to get WPML to translate the dynamic text. All we needed from support was to share the solution (or possible solutions). The solution is fairly simple, but due to the complexity of the WPML plugin, all the dependencies aren’t immediately clear. It would be great if these dependencies were described somewhere, but we couldn’t find any information on the WPML website about how to translate when these errors occur.

    In short, we’ve found a solution, but due to the specifics of Divi, there are limitations to using WPML. It would be great if WPML could seamlessly translate dynamic text throughout the entire site, including blocks created off-page in the Theme Builder section. Currently, you can translate the footer created in Theme Builder, but when using dynamic text (such as a date), it doesn’t translate, and searching for the code yields no results.

Để lại trả lời

Vui lòng giữ đúng chủ đề và tôn trọng người khác. Nếu bạn cần trợ giúp với các vấn đề không liên quan đến bài đăng này, hãy sử dụng Diễn đàn Hỗ trợ của chúng tôi để bắt đầu trò chuyện hoặc gửi vé hỗ trợ.

Bạn có thể sử dụng các thẻ này:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>