Recent Topics

1 Apr 29, 2005 17:17    

Would it be possible to fix B2Evolution so that it displays numeric numbers using proper international settings? It appears to do this for date/time but not for numbers. For example, on the stats page, on the bottom, it shows percentages as "87,1%", However in the US, the usual way of displaying this is "87.1%" (replace the comma with a period). This fix should be on all places that show numbers requiring a decimal place or a comma.

Love B2Evolution other than that though!

2 May 24, 2005 02:25

This little patch changes the comma to a dot, and apparently everywhere. Nice code design: having this in one place only :D


diff -u b2evolution/blogs/skins/bluesky/_functions_hitlogs.php.orig b2evolution/blogs/skins/bluesky/_functions_hitlogs.php
--- b2evolution/blogs/b2evocore/_functions_hitlogs.php.orig	2004-09-19 15:39:16.000000000 -0700
+++ b2evolution/blogs/b2evocore/_functions_hitlogs.php	2005-05-23 17:15:30.000000000 -0700
@@ -398,7 +398,7 @@
  */
 function stats_hit_percent( 
 	$decimals = 1, 
-	$dec_point = ',' )
+	$dec_point = '.' )
 {
 	global $row_stats, $stats_total_hits;
 	$percent = $row_stats['totalHits'] * 100 / $stats_total_hits;
@@ -569,4 +569,4 @@
 
 
 */
-?>
\ No newline at end of file
+?>

Of course, this should be selected appropriately through i18n. But until then, this patch should work for US users.

Cheers,
-Joe

3 May 27, 2005 15:36

Actually I think the whole world can cope with a '.' ;)

Why this is set to ',' by default is a mistery to me! (probably from the days when I though I was evloving b2 for me alone :p)

4 Jun 24, 2005 13:16

fplanque wrote:

Actually I think the whole world can cope with a '.' ;)

I can't agree, since in French, the right decimal separator is a comma, while the right thousand separator is a dot. One thousand euros would be written:

  • 1,000.00 € in English,

  • 1.000,00 € in French.[/list:u]

  • French people (as well as people from other countries) not used with computers would be confused to read a dot as decimal separator as English-speaking people are confused to see a comma there.

5 Jul 17, 2005 03:13

Where exactly would one place this patch?

6 Jul 23, 2005 00:05

brokenlyre wrote:

Where exactly would one place this patch?

In the top directory, with option -p1 to patch. See man patch


Form is loading...