- ステータス
- 解決済み
- 関連するプラグイン/テーマ
- The Events Calendar PRO
問題の概要
The Events Calendarプラグインによってwp_optionsテーブル(管理テキスト)に保存されているテキストを翻訳すると、フロントエンドには元の言語のバージョンが表示されます。

回避策
テーマのfunctions.phpファイルに以下のコードを追加することで、翻訳を修正できます。
add_filter('tribe_get_single_option', 'tribe_options_multilingual', 20, 3);
function tribe_options_multilingual( $option, $default, $option_name ) {
if (is_string($option)) {
return apply_filters( 'wpml_translate_single_string', $option, 'admin_texts_tribe_events_calendar_options', '[tribe_events_calendar_options]' . $option_name);
} else {
return $option;
}
}