Size units are now language dependant

This commit is contained in:
Loïc Chapeaux 2001-07-07 20:37:58 +00:00
parent 9580bcb8bc
commit 29ec39751e
25 changed files with 55 additions and 20 deletions

View File

@ -23,7 +23,7 @@ $Source$
commited some cosmetic changes.
* lib.inc.php3, lines 706 & 946-950; db_details.php3, lines 96 & 118;
language files: thousands and decimal separators are now language
dependant.
dependant, size units also.
* tbl_dump.php3, lines 78: Added a '#' before 'No tables found' so the
generated dump file may be imported later even if there is no table.
* db_printview.php3, line 29: Cosmetic change in column case name.

View File

@ -6,6 +6,7 @@ $left_font_family = "verdana, helvetica, arial, geneva, sans-serif";
$right_font_family = "helvetica, arial, geneva, sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Acesso Negado";
$strAction = "Ações";

View File

@ -6,6 +6,7 @@ $left_font_family = "sans-serif";
$right_font_family = "sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Îòêàçàí äîñòúï";
$strAction = "Äåéñòâèå";

View File

@ -6,6 +6,7 @@ $left_font_family = "verdana, helvetica, arial, geneva, sans-serif";
$right_font_family = "helvetica, arial, geneva, sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Access denegat";
$strAction = "Acció";

View File

@ -6,6 +6,7 @@ $left_font_family = "sans-serif";
$right_font_family = "sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "訪問被拒絕";
$strAction = "執行操作";

View File

@ -6,6 +6,7 @@ $left_font_family = "sans-serif";
$right_font_family = "sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "访问被拒绝";
$strAction = "执行操作";

View File

@ -6,6 +6,7 @@ $left_font_family = "verdana, helvetica, arial, geneva, sans-serif";
$right_font_family = "helvetica, arial, geneva, sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Pøístup odepøen";
$strAction = "Akce";

View File

@ -6,6 +6,7 @@ $left_font_family = "sans-serif";
$right_font_family = "sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Pøístup odepøen";
$strAction = "Akce";

View File

@ -6,6 +6,7 @@ $left_font_family = "verdana, helvetica, arial, geneva, sans-serif";
$right_font_family = "helvetica, arial, geneva, sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Adgang Nægtet";
$strAction = "Handling";

View File

@ -6,6 +6,7 @@ $left_font_family = "verdana, helvetica, arial, geneva, sans-serif";
$right_font_family = "helvetica, arial, geneva, sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Toegang geweigerd ";
$strAction = "Aktie";

View File

@ -6,6 +6,8 @@ $left_font_family = "verdana, helvetica, arial, geneva, sans-serif";
$right_font_family = "helvetica, arial, geneva, sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Access denied";
$strAction = "Action";

View File

@ -6,6 +6,7 @@ $left_font_family = "verdana, helvetica, arial, geneva, sans-serif";
$right_font_family = "helvetica, arial, geneva, sans-serif";
$number_thousands_separator = " ";
$number_decimal_separator = ",";
$byteUnits = array("Octets", "Ko", "Mo", "Go");
$strAccessDenied = "Accès refusé";
$strAction = "Action";

View File

@ -6,6 +6,7 @@ $left_font_family = "verdana, helvetica, arial, geneva, sans-serif";
$right_font_family = "helvetica, arial, geneva, sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Zugriff verweigert.";
$strAction = "Aktion";

View File

@ -6,6 +6,7 @@ $left_font_family = "verdana, helvetica, arial, geneva, sans-serif";
$right_font_family = "helvetica, arial, geneva, sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Accesso negato";
$strAction = "Azione";

View File

@ -6,6 +6,7 @@ $left_font_family = "sans-serif";
$right_font_family = "sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "アクセスは拒否されました。";
$strAction = "実行";

View File

@ -6,6 +6,7 @@ $left_font_family = "sans-serif";
$right_font_family = "sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "접근이 거부되었습니다.";
$strAction = "실행";

View File

@ -6,6 +6,7 @@ $left_font_family = "verdana, helvetica, arial, geneva, sans-serif";
$right_font_family = "helvetica, arial, geneva, sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Ingen tilgang";
$strAction = "Handling";

View File

@ -6,6 +6,7 @@ $left_font_family = "sans-serif";
$right_font_family = "sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Brak dostêpu";
$strAction = "Dzia³anie";

View File

@ -6,6 +6,7 @@ $left_font_family = "sans-serif";
$right_font_family = "sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Acesso Negado";
$strAction = "Ações";

View File

@ -6,6 +6,7 @@ $left_font_family = "sans-serif";
$right_font_family = "sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "÷ ÄÏÓÔÕÐÅ ÏÔËÁÚÁÎÏ";
$strAction = "äÅÊÓÔ×ÉÅ";

View File

@ -6,6 +6,7 @@ $left_font_family = "sans-serif";
$right_font_family = "sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Â äîñòóïå îòêàçàíî";
$strAction = "Äåéñòâèå";

View File

@ -6,6 +6,7 @@ $left_font_family = "sans-serif";
$right_font_family = "sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Acceso denegado ";
$strAction = "Acción";

View File

@ -6,6 +6,7 @@ $left_font_family = "verdana, helvetica, arial, geneva, sans-serif";
$right_font_family = "helvetica, arial, geneva, sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "Åtkommst nekad";
$strAction = "Handling";

View File

@ -6,6 +6,7 @@ $left_font_family = "sans-serif";
$right_font_family = "sans-serif";
$number_thousands_separator = ",";
$number_decimal_separator = ".";
$byteUnits = array("Bytes", "KB", "MB", "GB");
$strAccessDenied = "淞柰关<EFBFBD>点碎悛椐夜";#Access denied";
$strAction = "∶蟹印颐";

View File

@ -922,33 +922,44 @@ function delete_bookmarks($db, $cfgBookmark, $id) {
$cfgBookmark=get_bookmarks_param();
// formats $value to byte view - staybyte - 15. June 2001
// $comma <= how many comma
// $limes <= sensitiveness
function format_byte_down($value,$limes=6,$comma=0){
$dh=pow(10,$comma);
$li=pow(10,$limes);
$returnvalue=$value;
$unit="Byte";
if ($value >= $li*1000000){
$value=round($value/(1073741824/$dh))/$dh;
$unit="GB";
/**
* Formats $value to byte view
*
* @param double the value to format
* @param integer the sensitiveness
* @param integer the number of decimals to retain
*
* @return array the formatted value and its unit
*
* @author staybyte
* @version 1.1 - 07 July 2001
*/
function format_byte_down($value, $limes = 6, $comma = 0)
{
$dh = pow(10, $comma);
$li = pow(10, $limes);
$return_value = $value;
$unit = $GLOBALS['byteUnits'][0];
if ($value >= $li*1000000) {
$value = round($value/(1073741824/$dh))/$dh;
$unit = $GLOBALS['byteUnits'][3];
}
else if ($value >= $li*1000){
$value=round($value/(1048576/$dh))/$dh;
$unit="MB";
else if ($value >= $li*1000) {
$value = round($value/(1048576/$dh))/$dh;
$unit = $GLOBALS['byteUnits'][2];
}
else if ($value >= $li){
$value=round($value/(1024/$dh))/$dh;
$unit="KB";
else if ($value >= $li) {
$value = round($value/(1024/$dh))/$dh;
$unit = $GLOBALS['byteUnits'][1];
}
if ($unit!="Byte") {
if ($unit != 'Byte') {
$return_value = number_format($value, $comma, $GLOBALS['number_decimal_separator'], $GLOBALS['number_thousands_separator']);
} else {
$return_value = number_format($value, 0, $GLOBALS['number_decimal_separator'], $GLOBALS['number_thousands_separator']);
}
return array($return_value, $unit);
}
} // end of the 'format_byte_down' function
// to support special characters in db names: Lem9, 2001-06-27