Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.1k views
in Q2A Core by
In some languages the number separator is a dot instead of a comma, which means 17,000 is actually written as 17.000.

Is there an easy way to replace all commas by dots in counters such as views and user points?

2 Answers

0 votes
by

You can use filter or appropriate method (since I dont know what exactly you want to alter) and use string replace function

str_replace()

0 votes
by

Probably I think that it is issue below.
http://stackoverflow.com/questions/437371/php-locale-aware-number-format

Because Q2A don't appoint parameter of number_format() definitely, result may depend on locale. I do not have the experience corresponding to this matter, can you cope at qa-base.php (arround L112)?

Example:

  • setlocale(LC_NUMERIC, "C") ?
  • setlocale(LC_NUMERIC, "en_US.UTF-8") ?

I'm sorry if worthless. blush

by
There may be the same thing in .htaccess or php.ini.
...