Page MenuHomePhabricator

Add a way to use {{FORMATNUM}} to just do digit transform
Closed, ResolvedPublic

Description

Currently {{FORMATNUM}} always adds thousand separators, even though in PHP you can avoid adding those.


Version: 1.20.x
Severity: enhancement

Details

Reference
bz35753

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:13 AM
bzimport set Reference to bz35753.

it will useful for wikis that they needs to convert numbers to local numbers without thousand separators.

for example in fa.wiki converting year's number are not satisfactory

{{formatnum:2011}}==>۲،۰۱۱

with an option it should be (n could be an option for No thousand separators)

{{formatnum:2011|n}}==>۲۰۱۱

p.selitskas wrote:

Added NC parameter for it in Gerrit change #35603, but something wrong with the testcase (probably non-breakable spaces messed).

p.selitskas wrote:

Ic882d5ba merged.