问题概述
将 Premium Blocks for Gutenberg 与 WPML 结合使用时,在已翻译的页面上,Video Box 区块的说明和字幕会保持为默认语言。
临时解决方法
前往WPML设置自定义 XML 配置,添加以下 XML 并保存:
XML
<wpml-config> <gutenberg-blocks> <gutenberg-block type="premium/video-box" translate="1"> <xpath>//*[contains(@class,'premium-video-box__desc_text')]</xpath> <xpath>//*[contains(@class,'premium-video-box__caption_text')]</xpath> </gutenberg-block> </gutenberg-blocks> </wpml-config>
然后再次翻译该页面。