Allow using lang() in plugin with single language Adminer version
This commit is contained in:
parent
5eda7e547f
commit
18d51c6b6e
1 changed files with 7 additions and 4 deletions
11
compile.php
11
compile.php
|
@ -50,10 +50,13 @@ function put_file($match) {
|
|||
return '$_SESSION[lang]';
|
||||
}
|
||||
|
||||
function lang(\$translation, \$number) {
|
||||
\$pos = $match2[2]\t\t: " . (preg_match("~\\\$LANG == '$_SESSION[lang]'.* \\? (.+)\n~U", $match2[1], $match3) ? $match3[1] : "1") . '
|
||||
);
|
||||
$translation = str_replace("%d", "%s", $translation[$pos]);
|
||||
function lang(\$translation, \$number = 0) {
|
||||
if (is_array(\$translation)) {
|
||||
\$pos = $match2[2]\t\t\t: " . (preg_match("~\\\$LANG == '$_SESSION[lang]'.* \\? (.+)\n~U", $match2[1], $match3) ? $match3[1] : "1") . '
|
||||
);
|
||||
$translation = $translation[$pos];
|
||||
}
|
||||
$translation = str_replace("%d", "%s", $translation);
|
||||
$number = number_format($number, 0, ".", lang(\',\'));
|
||||
return sprintf($translation, $number);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue