From bdc19fd74915882945028b4bb65c01258691154c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Sat, 7 Jul 2001 17:16:02 +0000 Subject: [PATCH] Thousands and decimal separators are now language dependant --- ChangeLog | 2 ++ db_details.php3 | 4 ++-- lang/brazilian_portuguese.inc.php3 | 2 ++ lang/bulgarian-win1251.inc.php3 | 2 ++ lang/catala.inc.php3 | 2 ++ lang/chinese_big5.inc.php3 | 2 ++ lang/chinese_gb.inc.php3 | 2 ++ lang/czech-iso.inc.php3 | 2 ++ lang/czech-win1250.inc.php3 | 2 ++ lang/danish.inc.php3 | 2 ++ lang/dutch.inc.php3 | 2 ++ lang/english.inc.php3 | 4 +++- lang/french.inc.php3 | 20 +++++++++++--------- lang/german.inc.php3 | 2 ++ lang/italian.inc.php3 | 2 ++ lang/japanese.inc.php3 | 2 ++ lang/korean.inc.php3 | 2 ++ lang/norwegian.inc.php3 | 2 ++ lang/polish.inc.php3 | 2 ++ lang/portuguese.inc.php3 | 2 ++ lang/russian-koi8.inc.php3 | 2 ++ lang/russian-win1251.inc.php3 | 2 ++ lang/spanish.inc.php3 | 2 ++ lang/swedish.inc.php3 | 2 ++ lang/thai.inc.php3 | 2 ++ lib.inc.php3 | 9 ++++++--- 26 files changed, 66 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 702e3e48a..b2d303a7c 100755 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,8 @@ $Source$ language dependant. * tbl_properties.inc.php3, line 235: removed an unnecessary php closing tag. + * lib.inc.php3, lines 946-950; db_details.php3, lines 96 & 118; language + files: thousands and decimal separators are now language dependant. 2001-07-06 Loïc Chapeaux * users_details.php3: fixed many little scripting bugs. diff --git a/db_details.php3 b/db_details.php3 index 458162339..751caed98 100755 --- a/db_details.php3 +++ b/db_details.php3 @@ -93,7 +93,7 @@ else if (MYSQL_MAJOR_VERSION>=3.23 && isset($tbl_cache)){ &zero_rows="> ".number_format($sts_data["Rows"],0,',','.')."\n"; + echo "".number_format($sts_data["Rows"], 0, $number_decimal_separator, $number_thousands_separator)."\n"; $tblsize=$sts_data["Data_length"]+$sts_data["Index_length"]; $sum_size+=$tblsize; $sum_entries+=$sts_data["Rows"]; @@ -115,7 +115,7 @@ else if (MYSQL_MAJOR_VERSION>=3.23 && isset($tbl_cache)){ if (!empty($strSum)) echo $strSum; echo "\n"; list ($sum_formated,$unit)=format_byte_down($sum_size,3,1); - echo "".number_format($sum_entries,0,',','.')."\n"; + echo "".number_format($sum_entries, 0, $number_decimal_separator, $number_thousands_separator)."\n"; echo "$sum_formated $unit\n"; echo "\n"; diff --git a/lang/brazilian_portuguese.inc.php3 b/lang/brazilian_portuguese.inc.php3 index 0a6b098c1..12fccbb09 100644 --- a/lang/brazilian_portuguese.inc.php3 +++ b/lang/brazilian_portuguese.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-1"; $left_font_family = "verdana, helvetica, arial, geneva, sans-serif"; $right_font_family = "helvetica, arial, geneva, sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Acesso Negado"; $strAction = "Ações"; diff --git a/lang/bulgarian-win1251.inc.php3 b/lang/bulgarian-win1251.inc.php3 index 09c540535..583c81af3 100644 --- a/lang/bulgarian-win1251.inc.php3 +++ b/lang/bulgarian-win1251.inc.php3 @@ -4,6 +4,8 @@ $charset = "windows-1251"; $left_font_family = "sans-serif"; $right_font_family = "sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Îòêàçàí äîñòúï"; $strAction = "Äåéñòâèå"; diff --git a/lang/catala.inc.php3 b/lang/catala.inc.php3 index 71da9bbe6..ae5c800b1 100644 --- a/lang/catala.inc.php3 +++ b/lang/catala.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-1"; $left_font_family = "verdana, helvetica, arial, geneva, sans-serif"; $right_font_family = "helvetica, arial, geneva, sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Access denegat"; $strAction = "Acció"; diff --git a/lang/chinese_big5.inc.php3 b/lang/chinese_big5.inc.php3 index fd30a38cd..41dd430a6 100644 --- a/lang/chinese_big5.inc.php3 +++ b/lang/chinese_big5.inc.php3 @@ -4,6 +4,8 @@ $charset = "big5"; $left_font_family = "sans-serif"; $right_font_family = "sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "³X°Ý³Q©Úµ´"; $strAction = "°õ¦æ¾Þ§@"; diff --git a/lang/chinese_gb.inc.php3 b/lang/chinese_gb.inc.php3 index fbafdca80..daa66198c 100644 --- a/lang/chinese_gb.inc.php3 +++ b/lang/chinese_gb.inc.php3 @@ -4,6 +4,8 @@ $charset = "gb2312"; $left_font_family = "sans-serif"; $right_font_family = "sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "·ÃÎʱ»¾Ü¾ø"; $strAction = "Ö´ÐвÙ×÷"; diff --git a/lang/czech-iso.inc.php3 b/lang/czech-iso.inc.php3 index e878d94ce..20737ba19 100644 --- a/lang/czech-iso.inc.php3 +++ b/lang/czech-iso.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-2"; $left_font_family = "verdana, helvetica, arial, geneva, sans-serif"; $right_font_family = "helvetica, arial, geneva, sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Pøístup odepøen"; $strAction = "Akce"; diff --git a/lang/czech-win1250.inc.php3 b/lang/czech-win1250.inc.php3 index 6e474abdd..b22d42bb4 100644 --- a/lang/czech-win1250.inc.php3 +++ b/lang/czech-win1250.inc.php3 @@ -4,6 +4,8 @@ $charset = "windows-1250"; $left_font_family = "sans-serif"; $right_font_family = "sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Pøístup odepøen"; $strAction = "Akce"; diff --git a/lang/danish.inc.php3 b/lang/danish.inc.php3 index 714b773dc..bba03def4 100644 --- a/lang/danish.inc.php3 +++ b/lang/danish.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-1"; $left_font_family = "verdana, helvetica, arial, geneva, sans-serif"; $right_font_family = "helvetica, arial, geneva, sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Adgang Nægtet"; $strAction = "Handling"; diff --git a/lang/dutch.inc.php3 b/lang/dutch.inc.php3 index 3a4d588a2..7dd3fae54 100644 --- a/lang/dutch.inc.php3 +++ b/lang/dutch.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-1"; $left_font_family = "verdana, helvetica, arial, geneva, sans-serif"; $right_font_family = "helvetica, arial, geneva, sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Toegang geweigerd "; $strAction = "Aktie"; diff --git a/lang/english.inc.php3 b/lang/english.inc.php3 index dfb833d72..fdd77a4df 100644 --- a/lang/english.inc.php3 +++ b/lang/english.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-1"; $left_font_family = "verdana, helvetica, arial, geneva, sans-serif"; $right_font_family = "helvetica, arial, geneva, sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Access denied"; $strAction = "Action"; @@ -251,7 +253,7 @@ $strUsage = "Usage"; $strUser = "User"; $strUserEmpty = "The user name is empty!"; $strUserName = "User name"; -$strUsers = "Users and privileges"; +$strUsers = "Users"; $strUseTables = ""; //to translate, but its not in use ... $strValue = "Value"; diff --git a/lang/french.inc.php3 b/lang/french.inc.php3 index e5321ecc9..09a61ef7f 100644 --- a/lang/french.inc.php3 +++ b/lang/french.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-1"; $left_font_family = "verdana, helvetica, arial, geneva, sans-serif"; $right_font_family = "helvetica, arial, geneva, sans-serif"; +$number_thousands_separator = " "; +$number_decimal_separator = ","; $strAccessDenied = "Accès refusé"; $strAction = "Action"; @@ -13,8 +15,8 @@ $strAddNewField = "Ajouter un champ"; $strAddPriv = "Ajouter un privilège"; $strAddPrivMessage = "Vous avez ajouté un privilège"; $strAddSearchConditions = "Critères de recherche (pour l'énoncé \"where\"):"; -$strAddUser = "Ajouter un utilisateur"; -$strAddUserMessage = "Vous avez ajouté un utilisateur"; +$strAddUser = "Ajouter un usager"; +$strAddUserMessage = "Vous avez ajouté un usager"; $strAfter = "Après"; $strAll = "Tout"; $strAlterOrderBy = "Ordonner la table par"; @@ -26,7 +28,7 @@ $strAnyColumn = "Toute colonne"; $strAnyDatabase = "Toute base de données"; $strAnyHost = "Tout serveur"; $strAnyTable = "Toute table"; -$strAnyUser = "Tout utilisateur"; +$strAnyUser = "Tout usager"; $strAPrimaryKey = "Une clé primaire a été ajoutée sur"; $strAscending = "Croissant"; $strAtBeginningOfTable = "En début de Table"; @@ -70,7 +72,7 @@ $strDelete = "Effacer"; $strDeleted = "L'enregistrement a été effacé"; $strDeleteFailed = "L'effacement a échoué"; $strDeletePassword = "Effacer le mot de passe"; -$strDeleteUserMessage = "Vous avez effacé l'utilisateur"; +$strDeleteUserMessage = "Vous avez effacé l'usager"; $strDelPassMessage = "Vous avez effacé le mot de passe de "; $strDescending = "Décroissant"; $strDisableMagicQuotes = "Attention: Vous avez positionné magic_quotes_gpc dans la configuration de PHP. Cette version de PhpMyAdmin ne peut fonctionner correctement avec. Veuillez vous référer au paragraphe traitant de la configration dans la documentation de PHP pour positionner cette variable à off."; @@ -155,7 +157,7 @@ $strNoRights = "Vous n' $strNoTablesFound = "Aucune table n'a été trouvée dans cette base."; $strNotNumber = "Ce n'est pas un nombre !"; $strNotValidNumber = " n'est pas un nombre valide !"; -$strNoUsersFound = "Il n'y a aucun utilisateur"; +$strNoUsersFound = "Il n'y a aucun usager"; $strNull = "Null"; $strNumberIndexes = " Nombre d'index spéciaux "; @@ -251,10 +253,10 @@ $strUpdatePassword = "Changer le mot de passe"; $strUpdatePrivMessage = "Vous avez modifié les privilèges pour"; $strUpdateQuery = "Mise-à-jour de la requête"; $strUsage = "Espace"; -$strUser = "Utilisateur"; -$strUserEmpty = "Le nom d'utilisateur est vide"; -$strUserName = "Nom d'utilisateur"; -$strUsers = "Utilisateurs et privilèges"; +$strUser = "Usager"; +$strUserEmpty = "Le nom d'usager est vide"; +$strUserName = "Nom d'usager"; +$strUsers = "Usagers"; $strUseTables = "Utiliser les tables"; $strValue = "Valeur"; diff --git a/lang/german.inc.php3 b/lang/german.inc.php3 index fd06f76b3..5f8453b78 100644 --- a/lang/german.inc.php3 +++ b/lang/german.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-1"; $left_font_family = "verdana, helvetica, arial, geneva, sans-serif"; $right_font_family = "helvetica, arial, geneva, sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Zugriff verweigert."; $strAction = "Aktion"; diff --git a/lang/italian.inc.php3 b/lang/italian.inc.php3 index c05a7fbb1..f198637a2 100644 --- a/lang/italian.inc.php3 +++ b/lang/italian.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-1"; $left_font_family = "verdana, helvetica, arial, geneva, sans-serif"; $right_font_family = "helvetica, arial, geneva, sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Accesso negato"; $strAction = "Azione"; diff --git a/lang/japanese.inc.php3 b/lang/japanese.inc.php3 index 54c399253..50968fb6e 100644 --- a/lang/japanese.inc.php3 +++ b/lang/japanese.inc.php3 @@ -4,6 +4,8 @@ $charset = "euc-jp"; $left_font_family = "sans-serif"; $right_font_family = "sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "¥¢¥¯¥»¥¹¤ÏµñÈݤµ¤ì¤Þ¤·¤¿¡£"; $strAction = "¼Â¹Ô"; diff --git a/lang/korean.inc.php3 b/lang/korean.inc.php3 index 392815ae5..53064457d 100644 --- a/lang/korean.inc.php3 +++ b/lang/korean.inc.php3 @@ -4,6 +4,8 @@ $charset = "ks_c_5601-1987"; $left_font_family = "sans-serif"; $right_font_family = "sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Á¢±ÙÀÌ °ÅºÎµÇ¾ú½À´Ï´Ù."; $strAction = "½ÇÇà"; diff --git a/lang/norwegian.inc.php3 b/lang/norwegian.inc.php3 index 7b5f0248e..02855e704 100644 --- a/lang/norwegian.inc.php3 +++ b/lang/norwegian.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-1"; $left_font_family = "verdana, helvetica, arial, geneva, sans-serif"; $right_font_family = "helvetica, arial, geneva, sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Ingen tilgang"; $strAction = "Handling"; diff --git a/lang/polish.inc.php3 b/lang/polish.inc.php3 index c782c7554..7d587361d 100644 --- a/lang/polish.inc.php3 +++ b/lang/polish.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-2"; $left_font_family = "sans-serif"; $right_font_family = "sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Brak dostêpu"; $strAction = "Dzia³anie"; diff --git a/lang/portuguese.inc.php3 b/lang/portuguese.inc.php3 index d3c1b2670..8f70db61d 100644 --- a/lang/portuguese.inc.php3 +++ b/lang/portuguese.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-1"; $left_font_family = "sans-serif"; $right_font_family = "sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Acesso Negado"; $strAction = "Ações"; diff --git a/lang/russian-koi8.inc.php3 b/lang/russian-koi8.inc.php3 index e9702f9ea..78ced845c 100644 --- a/lang/russian-koi8.inc.php3 +++ b/lang/russian-koi8.inc.php3 @@ -4,6 +4,8 @@ $charset = "koi8-r"; $left_font_family = "sans-serif"; $right_font_family = "sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "÷ ÄÏÓÔÕÐÅ ÏÔËÁÚÁÎÏ"; $strAction = "äÅÊÓÔ×ÉÅ"; diff --git a/lang/russian-win1251.inc.php3 b/lang/russian-win1251.inc.php3 index 94890a1ab..2be856041 100644 --- a/lang/russian-win1251.inc.php3 +++ b/lang/russian-win1251.inc.php3 @@ -4,6 +4,8 @@ $charset = "windows-1251"; $left_font_family = "sans-serif"; $right_font_family = "sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = " äîñòóïå îòêàçàíî"; $strAction = "Äåéñòâèå"; diff --git a/lang/spanish.inc.php3 b/lang/spanish.inc.php3 index cddb883b6..1416fd5ab 100644 --- a/lang/spanish.inc.php3 +++ b/lang/spanish.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-1"; $left_font_family = "sans-serif"; $right_font_family = "sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Acceso denegado "; $strAction = "Acción"; diff --git a/lang/swedish.inc.php3 b/lang/swedish.inc.php3 index 1c801a476..5a27f65ea 100644 --- a/lang/swedish.inc.php3 +++ b/lang/swedish.inc.php3 @@ -4,6 +4,8 @@ $charset = "iso-8859-1"; $left_font_family = "verdana, helvetica, arial, geneva, sans-serif"; $right_font_family = "helvetica, arial, geneva, sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "Åtkommst nekad"; $strAction = "Handling"; diff --git a/lang/thai.inc.php3 b/lang/thai.inc.php3 index 8442a5ce0..f4e1a3eed 100644 --- a/lang/thai.inc.php3 +++ b/lang/thai.inc.php3 @@ -4,6 +4,8 @@ $charset = "tis-620"; $left_font_family = "sans-serif"; $right_font_family = "sans-serif"; +$number_thousands_separator = ","; +$number_decimal_separator = "."; $strAccessDenied = "äÁè͹حҵãËéãªé§Ò¹";#Access denied"; $strAction = "¡ÃзӡÒÃ"; diff --git a/lib.inc.php3 b/lib.inc.php3 index 0c4d29147..e7fd41466 100755 --- a/lib.inc.php3 +++ b/lib.inc.php3 @@ -943,9 +943,12 @@ function format_byte_down($value,$limes=6,$comma=0){ $value=round($value/(1024/$dh))/$dh; $unit="KB"; } - if ($unit!="Byte") $returnvalue=number_format($value,$comma,',','.'); - else $returnvalue=number_format($value,0,',','.'); - return array($returnvalue,$unit); + 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); } // to support special characters in db names: Lem9, 2001-06-27