Help:Number formatting

You can build great collaborative databases with SMW, but it currently lacks when it comes to actually getting the data out exactly as desired - for example in the area of number formatting.

There is currently no way to tell SMW to print out numbers with, say, two decimal places - as it is custom for monetary amounts (see this bug report). As a workaround for this problem, the NumberFormat extension can be used.

Basically you use e.g. 'format=template' or 'format=sum' in inline queries and wrap the NUMBER parameters in " " parser function calls. It is important to switch off MediaWiki's (rudimentary) number formatting by using core MediaWiki's " " parser function for the numbers you pass through.


 * Example to format numbers in "German style"

12345,67 becomes 12.345,67 on a German language instance
 * Result