Page MenuHomePhorge

function pht($text, $variant, ...)
Arcanist Technical Documentation ()

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$textTranslation identifier with `sprintf()` placeholders.
mixed$variantValue to select the variant from (e.g. singular or plural).
...Next values referenced from $text.
Return
stringTranslated string with substituted values.