12 function __($original)
16 if (func_num_args() === 1) {
20 $args = array_slice(func_get_args(), 1);
22 return vsprintf(
$text, is_array($args[0]) ? $args[0] : $args);
34 function n__($original, $plural, $value)
38 if (func_num_args() === 3) {
42 $args = array_slice(func_get_args(), 3);
44 return vsprintf(
$text, is_array($args[0]) ? $args[0] : $args);
55 function p__($context, $original)
59 if (func_num_args() === 2) {
63 $args = array_slice(func_get_args(), 2);
65 return vsprintf(
$text, is_array($args[0]) ? $args[0] : $args);
80 if (func_num_args() === 2) {
84 $args = array_slice(func_get_args(), 2);
86 return vsprintf(
$text, is_array($args[0]) ? $args[0] : $args);
102 if (func_num_args() === 3) {
106 $args = array_slice(func_get_args(), 3);
108 return vsprintf(
$text, is_array($args[0]) ? $args[0] : $args);
121 function np__($context, $original, $plural, $value)
125 if (func_num_args() === 4) {
129 $args = array_slice(func_get_args(), 4);
131 return vsprintf(
$text, is_array($args[0]) ? $args[0] : $args);
149 if (func_num_args() === 5) {
153 $args = array_slice(func_get_args(), 5);
155 return vsprintf(
$text, is_array($args[0]) ? $args[0] : $args);
165 echo call_user_func_array(
'__', func_get_args());
175 echo call_user_func_array(
'n__', func_get_args());
185 echo call_user_func_array(
'p__', func_get_args());
195 echo call_user_func_array(
'd__', func_get_args());
205 echo call_user_func_array(
'dp__', func_get_args());
215 echo call_user_func_array(
'dnp__', func_get_args());
__e()
Prints function result.
__($original)
Returns the translation of a string.
n__e()
Prints function result.
dnp__($domain, $context, $original, $plural, $value)
Returns the singular/plural translation of a string in a specific domain and context.
d__e()
Prints function result.
p__e()
Prints function result.
dp__e()
Prints function result.
n__($original, $plural, $value)
Returns the singular/plural translation of a string.
dnp__e()
Prints function result.
if(!array_key_exists('domain', $_REQUEST)) $domain
np__($context, $original, $plural, $value)
Returns the singular/plural translation of a string in a specific context.
d__($domain, $original)
Returns the translation of a string in a specific domain.
p__($context, $original)
Returns the translation of a string in a specific context.
dp__($domain, $context, $original)
Returns the translation of a string in a specific domain and context.