问题概述
将Flatsome与 WPML 结合使用时,某些文本无法翻译:主题选项中的页眉联系时间和博客摘要后缀、Testimonial 元素的名称和公司、页眉按钮的文本,以及 Products 元素的标题。
临时解决方法
- 前往WPML设置自定义 XML 配置,添加以下 XML 并保存:
XML
<wpml-config> <shortcodes> <shortcode> <tag>testimonial</tag> <attributes> <attribute>name</attribute> <attribute>company</attribute> <attribute type="link">link</attribute> </attributes> </shortcode> <shortcode> <tag>header_button</tag> <attributes> <attribute>text</attribute> <attribute type="link">link</attribute> </attributes> </shortcode> <shortcode> <tag>ux_products</tag> <attributes> <attribute>title</attribute> </attributes> </shortcode> </shortcodes> <admin-texts> <key name="theme_mods_flatsome"> <key name="contact_hours" /> <key name="blog_excerpt_suffix" /> </key> </admin-texts> </wpml-config>
- 在WPML字符串翻译中翻译主题选项文本。
- 再次翻译使用这些 UX Builder 元素的页面。