Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Talking about decimals and thousands separators (file download size)
I think this hasn’t been brought up yet, so I share the knowledge.
We already know that half of the world uses commas as a decimal point and a dot as a thousands separator, and they feel kinda disoriented when they expect some thousands to show up as the right size of a file and they only get some little bits of data instead. Well, here is the solution, a little hack to the function «file_download_size»:
file to edit: «textpattern/publish/taghandlers.php»
Look there for a function called as stated: «file_download_size»
There is a line on that function that reads something like, «return number_format(…)», ok, replace it with:
return number_format($t,$decimals,”,”,”.”) . ‘ ‘ . $format;
That says to use a comma as the decimal point and a dot as the thousands separator.
Regards,
Zeles.
Offline