Willkommen Gast. Bitte Einloggen oder Registrieren
 
Sprache wählen:
 
  Last Script Version: 20

  ÜbersichtHilfeSuchenEinloggenRegistrieren  
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken
Can I change the number delimiter for English ? (Gelesen: 618 mal)
John Motyer
Junior Member
**
Offline



Beiträge: 65
Burlington (Toronto), Canada
Geschlecht: male
Can I change the number delimiter for English ?
12.01.24 um 15:02:25
 
Hello again, Reimar & Holger,

Is there an easy & simple place in a single file that I can change your code, so that my WebStat websites (which display in English) can have their number delimiter use a comma separator (that the English language uses), instead of the current decimal delimiter (that the German language uses & which WebStat currently uses for English also)?

Example...

Currently:  123.456 (for both German & English)
English:  123,456

Thank you in advance.

Regards,
John
Zum Seitenanfang
 

My phpWebStats:
| AuroraWings | FusionWings | GalleryWings | GenealogyWings | +7 more
Homepage  
IP gespeichert
 
Reimar
Administrator
*****
Offline



Beiträge: 1994
Geschlecht: male
Re: Can I change the number delimiter for English ?
Antwort #1 - 12.01.24 um 21:20:02
 
Hi John,

good point ! We will keep this in mind for our next update.

If you want to try for yourself, have a look at the func/func_display.php as an example and search for the function 'number_format'.

Our code
Code (PHP):
number_format ( $module2 , 0 , "," , "." ) 



New code
Code (PHP):
number_format ( $module2) 



There are several variables ($module2, etc.) that need to be changed. Our example you will find at lines 70ff.

Best regards
Reimar

Zum Seitenanfang
 
 
IP gespeichert
 
John Motyer
Junior Member
**
Offline



Beiträge: 65
Burlington (Toronto), Canada
Geschlecht: male
Re: Can I change the number delimiter for English ?
Antwort #2 - 12.01.24 um 22:07:04
 
Perfect.  Code modifications made, and my sites now display the comma delimeter.

I also modified lines 364 and 365, by inserting spaces on both sides of the slash: from '/'  to  ' / ', to make those easier to read on their respective pages.

I haven't looked yet to see if it is possible to change the delimeters similarly for Last Hits... will maybe search for that code this weekend, but changing the delimeter for Last Hits is NOT important to me.

Thank you for your quick reply, and have a great weekend.

Regards,
John
Zum Seitenanfang
 

My phpWebStats:
| AuroraWings | FusionWings | GalleryWings | GenealogyWings | +7 more
Homepage  
IP gespeichert
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken