Use vsprintf()
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@241 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
620cb07e19
commit
0c3f846509
|
@ -161,7 +161,6 @@ function lang($idf, $number = null) {
|
||||||
if ($number === false) { // used in _compile.php
|
if ($number === false) { // used in _compile.php
|
||||||
return ($translation ? $translation : $idf);
|
return ($translation ? $translation : $idf);
|
||||||
}
|
}
|
||||||
$args = func_get_args();
|
|
||||||
if (is_array($translation) && $translation) {
|
if (is_array($translation) && $translation) {
|
||||||
switch ($LANG) {
|
switch ($LANG) {
|
||||||
case 'cs': $pos = ($number == 1 ? 0 : (!$number || $number >= 5 ? 2 : 1)); break;
|
case 'cs': $pos = ($number == 1 ? 0 : (!$number || $number >= 5 ? 2 : 1)); break;
|
||||||
|
@ -169,10 +168,9 @@ function lang($idf, $number = null) {
|
||||||
}
|
}
|
||||||
$translation = $translation[$pos];
|
$translation = $translation[$pos];
|
||||||
}
|
}
|
||||||
if ($translation) {
|
$args = func_get_args();
|
||||||
$args[0] = $translation;
|
array_shift($args);
|
||||||
}
|
return vsprintf(($translation ? $translation : $idf), $args);
|
||||||
return call_user_func_array('sprintf', $args);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function switch_lang() {
|
function switch_lang() {
|
||||||
|
|
Loading…
Reference in a new issue