wpseek.com
WordPress开发者和主题制作者的搜索引擎



translate_with_context › WordPress Function

Since2.5.0
已弃用2.9.0
translate_with_context ( $text, $domain = 'default' )
参数: (2)
  • (string) $text Text to translate.
    Required: Yes
  • (string) $domain Domain to retrieve the translated text.
    Required: No
    默认: 'default'
查看:
返回:
  • (string) Translated text.
定义在:
文档:

Translates $text like translate(), but assumes that the text contains a context after its last vertical bar.



源码

function translate_with_context( $text, $domain = 'default' ) {
	_deprecated_function( __FUNCTION__, '2.9.0', '_x()' );
	return before_last_bar( translate( $text, $domain ) );
}