问题概述
将Premium Blocks for Gutenberg与 WPML 结合使用时,在翻译后的页面上,Fancy Text区块的动画文字会保持为默认语言。前缀和后缀会被翻译。
临时解决方法
前往WPML设置自定义 XML 配置,添加以下 XML 并保存:
XML
<wpml-config> <gutenberg-blocks> <gutenberg-block type="premium/fancy-text" translate="1"> <xpath>//span</xpath> <xpath>//li</xpath> <xpath>//*[@data-strings]/@data-strings</xpath> </gutenberg-block> </gutenberg-blocks> </wpml-config>
然后再次翻译该页面。