array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.dgettext.php', 1 => 'dgettext', 2 => 'Override the current domain', ), 'up' => array ( 0 => 'ref.gettext.php', 1 => 'Gettext 函数', ), 'prev' => array ( 0 => 'function.dcngettext.php', 1 => 'dcngettext', ), 'next' => array ( 0 => 'function.dngettext.php', 1 => 'dngettext', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/gettext/functions/dgettext.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

dgettext

(PHP 4, PHP 5, PHP 7, PHP 8)

dgettextOverride the current domain

说明

dgettext(string $domain, string $message): string

The dgettext() function allows you to override the current domain for a single message lookup.

参数

domain

The domain

message

The message

返回值

A string on success.

错误/异常

Throws a ValueError if domain is the empty string.

更新日志

版本 说明
8.4.0 Now throws a ValueError if domain is the empty string.

参见