translate_with_context() WP 2.5.0
Устарела с версии 3.0.0. Больше не поддерживается и может быть удалена. Используйте _x().╳
Translates $text like translate(), but assumes that the text contains a context after its last vertical bar.
Хуков нет.
Возвращает
Строку. Translated text.
Использование
translate_with_context( $text, $domain );
- $text(строка) (обязательный)
- Text to translate.
- $domain(строка)
- Domain to retrieve the translated text.
Заметки
- Смотрите: _x()
Список изменений
С версии 2.5.0 | Введена. |
Устарела с 3.0.0 | Use _x() |
Код translate_with_context() translate with context WP 5.6.2
function translate_with_context( $text, $domain = 'default' ) {
_deprecated_function( __FUNCTION__, '2.9.0', '_x()' );
return before_last_bar( translate( $text, $domain ) );
}