foreach (table_status() as $table_status) {
$return += $table_status["Data_length"] + $table_status["Index_length"];
}
- return number_format($return, 0, '.', lang(','));
+ return format_number($return);
}
return h($match[1]) . $suffix . (isset($match[2]) ? "" : "<i>...</i>");
}
+/** Format decimal number
+* @param int
+* @return string
+*/
+function format_number($val) {
+ return strtr(number_format($val, 0, ".", lang(',')), preg_split('~~u', lang('0123456789'), -1, PREG_SPLIT_NO_EMPTY));
+}
+
/** Generate friendly URL
* @param string
* @return string
array_shift($args);
$format = str_replace("%d", "%s", $translation);
if ($format != $translation) {
- $args[0] = number_format($number, 0, ".", lang(','));
+ $args[0] = format_number($number);
}
return vsprintf($format, $args);
}
'Data Free' => 'المساحة الحرة',
'Rows' => 'الأسطر',
',' => ',',
+ '0123456789' => '٠١٢٣٤٥٦٧٨٩',
'Analyze' => 'تحليل',
'Optimize' => 'تحسين',
'Check' => 'فحص',
'Tables have been truncated.' => 'টেবিল ছাঁটাই করা হয়েছে',
'Rows' => 'সারি',
',' => ',',
+ '0123456789' => '০১২৩৪৫৬৭৮৯',
'Tables have been moved.' => 'টেবিল স্থানান্তর করা হয়েছে।',
'Move to other database' => 'অন্য ডাটাবেজে স্থানান্তর করো',
'Move' => 'স্থানান্তর করো',
'Tables have been truncated.' => 'S\'han escapçat les taules.',
'Rows' => 'Files',
',' => ',',
+ '0123456789' => '0123456789',
'Tables have been moved.' => 'S\'han desplaçat les taules.',
'Move to other database' => 'Desplaça a una altra base de dades',
'Move' => 'Desplaça',
// thousands separator - must contain single byte
',' => ' ',
+ '0123456789' => '0123456789',
'Engine' => 'Úložiště',
'Collation' => 'Porovnávání',
'Data Length' => 'Velikost dat',
'Tables have been truncated.' => 'Tabellen sind entleert worden (truncate).',
'Rows' => 'Datensätze',
',' => ' ',
+ '0123456789' => '0123456789',
'Tables have been moved.' => 'Tabellen verschoben.',
'Move to other database' => 'In andere Datenbank verschieben',
'Move' => 'Verschieben',
'Tables have been truncated.' => 'Tablas vaciadas (truncate).',
'Rows' => 'Registros',
',' => ' ',
+ '0123456789' => '0123456789',
'Tables have been moved.' => 'Se movieron las tablas.',
'Move to other database' => 'Mover a otra base de datos',
'Move' => 'Mover',
'Data Free' => 'Vaba ruumi',
'Rows' => 'Ridu',
',' => ',',
+ '0123456789' => '0123456789',
'Analyze' => 'Analüüsi',
'Optimize' => 'Optimeeri',
'Check' => 'Kontrolli',
// thousands separator - must contain single byte
',' => ' ',
+ '0123456789' => '۰۱۲۳۴۵۶۷۸۹',
'Engine' => 'موتور',
'Collation' => 'تطبیق',
'Data Length' => 'طول داده',
'Data Free' => 'Espace inutilisé',
'Rows' => 'Lignes',
',' => ',',
+ '0123456789' => '0123456789',
'Analyze' => 'Analyser',
'Optimize' => 'Optimiser',
'Check' => 'Vérifier',
'Partitions' => 'Partitions',
'Partition name' => 'Nom de la partition',
'Values' => 'Valeurs',
- '%d row(s) have been imported.' => array('%d ligne a été importée.','%d lignes ont été importées.'),
+ '%d row(s) have been imported.' => array('%d ligne a été importée.', '%d lignes ont été importées.'),
'anywhere' => 'n\'importe où',
'Import' => 'Importer',
'Stop on error' => 'Arrêter en cas d\'erreur',
'Tables have been truncated.' => 'A tábla felszabadítva.',
'Rows' => 'Oszlop',
',' => ' ',
+ '0123456789' => '0123456789',
'Tables have been moved.' => 'Táblák áthelyezve.',
'Move to other database' => 'Áthelyezés másik adatbázisba',
'Move' => 'Áthelyez',
// thousands separator - must contain single byte
',' => '.',
+ '0123456789' => '0123456789',
'Engine' => 'Mesin',
'Collation' => 'Kolasi',
'Data Length' => 'Panjang Data',
'Data Free' => 'Dati liberi',
'Rows' => 'Righe',
',' => '.',
+ '0123456789' => '0123456789',
'Analyze' => 'Analizza',
'Optimize' => 'Ottimizza',
'Check' => 'Controlla',
'Data Free' => '空き',
'Rows' => '行数',
',' => ',',
+ '0123456789' => '0123456789',
'Analyze' => '分析',
'Optimize' => '最適化',
'Check' => 'チェック',
'Data Free' => '여유',
'Rows' => '행',
',' => ',',
+ '0123456789' => '0123456789',
'Analyze' => '분석',
'Optimize' => '최적화',
'Check' => '확인',
// thousands separator - must contain single byte
',' => ' ',
+ '0123456789' => '0123456789',
'Engine' => 'Variklis',
'Collation' => 'Lyginimas',
'Data Length' => 'Duomenų ilgis',
'Data Free' => 'Data Vrij',
'Rows' => 'Rijen',
',' => '.',
+ '0123456789' => '0123456789',
'Analyze' => 'Analyseer',
'Optimize' => 'Optimaliseer',
'Check' => 'Controleer',
'Database schema' => 'Databaseskjema',
'Permanent link' => 'Permanent lenke',
',' => ' ',
+ '0123456789' => '0123456789',
'Engine' => 'Motor',
'Collation' => 'Tekstsortering',
'Data Length' => 'Datalengde',
// thousands separator - must contain single byte
',' => ' ',
+ '0123456789' => '0123456789',
'Engine' => 'Składowanie',
'Collation' => 'Porównywanie znaków',
'Data Length' => 'Rozmiar danych',
'Tables have been truncated.' => 'As Tabelas foram truncadas.',
'Rows' => 'Registros',
',' => ' ',
+ '0123456789' => '0123456789',
'Tables have been moved.' => 'As Tabelas foram movidas.',
'Move to other database' => 'Mover para outra Base de dados',
'Move' => 'Mover',
'Tables have been truncated.' => 'Tabelas truncadas (truncate).',
'Rows' => 'Registos',
',' => ' ',
+ '0123456789' => '0123456789',
'Tables have been moved.' => 'As Tabelas foram movidas.',
'Move to other database' => 'Mover outra Base de dados',
'Move' => 'Mover',
'Tables have been truncated.' => 'Tabelele au fost curățate.',
'Rows' => 'Înscrieri',
',' => ',',
+ '0123456789' => '0123456789',
'Tables have been moved.' => 'Tabelele au fost mutate.',
'Move to other database' => 'Mută în altă bază de date',
'Move' => 'Mută',
'Tables have been truncated.' => 'Таблицы были очищены.',
'Rows' => 'Строк',
',' => ' ',
+ '0123456789' => '0123456789',
'Tables have been moved.' => 'Таблицы были перемещены.',
'Move to other database' => 'Переместить в другую базу данных',
'Move' => 'Переместить',
'Data Free' => 'Voľné miesto',
'Rows' => 'Riadky',
',' => ' ',
+ '0123456789' => '0123456789',
'Analyze' => 'Analyzovať',
'Optimize' => 'Optimalizovať',
'Check' => 'Skontrolovať',
// thousands separator - must contain single byte
',' => ' ',
+ '0123456789' => '0123456789',
'Engine' => 'Pogon',
'Collation' => 'Zbiranje',
'Data Length' => 'Velikost podatkov',
// thousands separator - must contain single byte
',' => ',',
+ '0123456789' => '0123456789',
'Engine' => 'Механизам',
'Collation' => 'Сравњивање',
'Data Length' => 'Дужина података',
'Tables have been truncated.' => 'அட்டவணை குறைக்கப்பட்டது (truncated).',
'Rows' => 'வரிசைகள்',
',' => ',',
+ '0123456789' => '0123456789',
'Tables have been moved.' => 'அட்டவணை நகர்த்தப்பட்டது.',
'Move to other database' => 'மற்ற தகவல் தளத்திற்க்கு நகர்த்து',
'Move' => 'நகர்த்து',
'Tables have been truncated.' => 'เคลียร์ตารางแล้ว (truncate).',
'Rows' => 'แถว',
',' => ' ',
+ '0123456789' => '0123456789',
'Tables have been moved.' => 'ตารางถูกย้ายแล้ว.',
'Move to other database' => 'ย้ายไปยังฐานข้อมูลอื่น',
'Move' => 'ย้าย',
// thousands separator - must contain single byte
',' => ' ',
+ '0123456789' => '0123456789',
'Engine' => 'Motor',
'Collation' => 'Karşılaştırma',
'Data Length' => 'Veri Uzunluğu',
// thousands separator - must contain single byte
',' => ' ',
+ '0123456789' => '0123456789',
'Engine' => 'Рушій',
'Collation' => 'Співставлення',
'Data Length' => 'Об\'єм даних',
'Permanent link' => 'xx',
// thousands separator - must contain single byte
- ',' => 'xx',
+ ',' => 'x',
+ '0123456789' => 'xxxxxxxxxx',
'Engine' => 'xx',
'Collation' => 'xx',
'Data Length' => 'xx',
'Data Free' => '資料空閒',
'Rows' => '行數',
',' => ',',
+ '0123456789' => '0123456789',
'Analyze' => '分析',
'Optimize' => '最佳化',
'Check' => '檢查',
'Data Free' => '数据空闲',
'Rows' => '行数',
',' => ',',
+ '0123456789' => '0123456789',
'Analyze' => '分析',
'Optimize' => '优化',
'Check' => '检查',
}
foreach ($sums + array("Auto_increment" => 0, "Rows" => 0) as $key => $val) {
if ($table_status[$key] != "") {
- $val = number_format($table_status[$key], 0, '.', lang(','));
+ $val = format_number($table_status[$key]);
json_row("$key-$id", ($key == "Rows" && $val && $table_status["Engine"] == ($sql == "pgsql" ? "table" : "InnoDB")
? "~ $val"
: $val
}
}
foreach ($sums as $key => $val) {
- json_row("sum-$key", number_format($val, 0, '.', lang(',')));
+ json_row("sum-$key", format_number($val));
}
json_row("");
SQLite: Support UPDATE OF triggers
SQLite: Display auto-created unique indexes, bug since Adminer 3.5.0
Editor: Fix login() method, bug since Adminer 4.0.0
+Translate numbers in ar, bn, fa
Adminer 4.0.3 (released 2014-02-01)
MongoDB: insert, truncate, indexes
$translation = $translation[$pos];
}
$translation = str_replace("%d", "%s", $translation);
- $number = number_format($number, 0, ".", lang(\',\'));
+ $number = format_number($number);
return sprintf($translation, $number);
}
';
if (isset($row["Engine"]) && $name != "") {
echo '<tr' . odd() . '><td>' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true), "", "formUncheck('check-all');");
echo "<th><a href='" . h(ME) . 'select=' . urlencode($table) . "'>$name</a>";
- $val = number_format($row["Rows"], 0, '.', lang(','));
+ $val = format_number($row["Rows"]);
echo "<td align='right'><a href='" . h(ME . "edit=") . urlencode($table) . "'>" . ($row["Engine"] == "InnoDB" && $val ? "~ $val" : $val) . "</a>";
}
}