- 状态
- 未解决
- 报告针对
- WPML Multilingual for BuddyPress and BuddyBoss 1.7.0
- 相关插件/主题
- BuddyBoss Platform
- 主题标签
- Bug, Compatibility
问题概述
在BuddyBoss 平台中,您可能会遇到搜索表单的翻译问题,因为尽管字段已在用户个人资料中翻译,但个人资料搜索页面并未显示翻译后的值。
临时解决方法
请在继续操作之前,确保对您的站点进行完整站点备份。
- 打开 …/wp-content/plugins/buddyboss-platform/bp-templates/bp-nouveau/buddypress/common/search/profile-search.php 文件。
- 替换:
value="<?php echo $key; ?>"><?php echo $label; ?></option>
- 替换为:
value="<?php echo $key; ?>"><?php $label = apply_filters( 'wpml_translate_single_string', $label, 'Buddypress Multilingual', 'profile field ' . $f->id . ' - option \'' . str_replace(' ', '-', strtolower($key)) . '\' name' ); echo $label; ?></option>