Page MenuHomePhabricator

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().

string$textTranslation identifier with `sprintf()` placeholders.
mixed$variantValue to select the variant from (e.g. singular or plural).
...Next values referenced from $text.
stringTranslated string with substituted values.