- 状态
- 已解决
- 报告针对
- WPForms Multilingual 0.5.0
- 解决于
- WPForms Multilingual 0.5.1
- 相关插件/主题
- WPForms
- 主题标签
- Compatibility
问题概述
将WPForms调查和投票与 WPML 结合使用时,您可能会遇到以下问题:某些字符串无法翻译。这可能会影响 Net Promoter 字段标签和 Page Break 进度条文本。
临时解决方法
在继续操作之前,请确保您的站点有完整站点备份。
- 将以下代码添加到您主题的functions.php文件中。
add_filter( 'wpml_forms_config_wpforms', function ( array $config ): array { $config['field']['lowest_label'] = [ 'type' => 'STRING', 'properties' => 'lowest_label', ]; $config['field']['highest_label'] = [ 'type' => 'STRING', 'properties' => 'highest_label', ]; $config['field']['progress_text'] = [ 'type' => 'STRING', 'properties' => 'progress_text', ]; return $config; } ); - 编辑原始表单并再次保存。
- 更新翻译。