WPML
状态
等待作者
相关插件/主题
Spectra
主题标签
Compatibility

问题概述

Spectra 与 WPML 结合使用时,您可能会遇到以下问题:某些 Spectra 区块未显示在高级翻译编辑器 (ATE) 中,或者即使在翻译后,其内容在前端仍未翻译。

临时解决方法

  • 在 WordPress 仪表板中,前往 WPML > 设置 > 自定义 XML 配置
  • 添加以下 XML 配置并保存:
    <wpml-config>
      <gutenberg-blocks>
        <gutenberg-block type="uagb/info-box" translate="1">
          <xpath>//*[contains(@class, "uagb-ifb-title")]</xpath>
          <xpath>//p[contains(@class, "uagb-ifb-desc")]</xpath>
          <xpath>//span[contains(@class, "uagb-inline-editing")]</xpath>
          <key name="tempHeadingDesc" />
          <key name="ctaText" />
        </gutenberg-block>
        <gutenberg-block type="uagb/image-gallery" translate="1">
          <key name="mediaGallery">
            <key name="*">
              <key name="id"/>
              <key name="url" type="link" />
              <key name="alt" />
              <key name="link" type="link" />
              <key name="caption" />
            </key>
          </key>
          <key name="mediaIDs">
            <key name="*" />
          </key>
        </gutenberg-block>
        <gutenberg-block type="uagb/tabs" translate="1">
          <key name="tabHeaders" />
          <xpath>//*[contains(@class, "uagb-tab")]/a/div</xpath>
        </gutenberg-block>
        <gutenberg-block type="uagb/tabs-child" translate="1">
          <key name="header" />
          <key name="tabHeaders">
            <key name="*" />
          </key>
        </gutenberg-block>
        <gutenberg-block type="uagb/modal" translate="1">
          <xpath>//span[contains(@class, "uagb-inline-editing")]</xpath>
          <xpath type="link">//a[contains(@class, "uagb-modal-button-link")]/@href</xpath>
          <key name="buttonText"/>
        </gutenberg-block>
      </gutenberg-blocks>
    </wpml-config>
            

所有已知问题 →