function pht($text, $variant, ...)libphutil Technical Documentation (Internationalization)
function pht($text, $variant, ...)
libphutil Technical Documentation (Internationalization)
Translate a string. It uses a translator set by PhutilTranslator::setInstance() or translations specified by PhutilTranslator::getInstance()->setTranslations() and language rules set by PhutilTranslator::getInstance()->setLocale().
Parameters
string | $text | Translation identifier with `sprintf()` placeholders. |
mixed | $variant | Value to select the variant from (e.g. singular or plural). |
... | Next values referenced from $text. |
Return
string | Translated string with substituted values. |