Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F65503272
pht.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jun 4, 06:11
Size
725 B
Mime Type
text/x-php
Expires
Thu, Jun 6, 06:11 (2 d)
Engine
blob
Format
Raw Data
Handle
18083150
Attached To
rPHU libphutil
pht.php
View Options
<?php
/**
* 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()`.
*
* @param string Translation identifier with `sprintf()` placeholders.
* @param mixed Value to select the variant from (e.g. singular or plural).
* @param ... Next values referenced from $text.
* @return string Translated string with substituted values.
*/
function
pht
(
$text
,
$variant
=
null
/* , ... */
)
{
$args
=
func_get_args
();
$translator
=
PhutilTranslator
::
getInstance
();
return
call_user_func_array
(
array
(
$translator
,
'translate'
),
$args
);
}
Event Timeline
Log In to Comment