2017.7.19 wordpress 404页面

描述
检索$ text的翻译。如果没有翻译,或者域未加载,则返回原始文本。
用法
<?php translate( $text, $domain ) ?>
参数
- $文本
- (string)(必填)要翻译的文本。
- 默认值:无
- $域
- (string)(可选)检索翻译文本的域。
- 默认值:’default’
返回值
- (string)
- 翻译文字。
列子
<?php _e( 'Oops! That page can’t be found.', 'wordpress' ); ?>
<?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'wordpress' ); ?>
—e()
描述
显示从translate()返回的翻译文本。
用法
<?php _e( $text, $domain ) ?>
参数
同上
返回值
- (void)
- 此函数不返回值。
例子
显示一些翻译文本:
<?php _e('要翻译和显示的文本','textdomain'); ?>
相关文章