Template talk:Lsc11

From Meta, a Wikimedia project coordination wiki

This template is applied to integers in the range 0 through 999,999,999 without commas to add thousands separators for convenience, while preserving numeric sorting with Javascript. This is achieved by forcing alphabetic sorting mode, and formatting the numbers such that alphabetic sorting matches numeric sorting.

It does the following:

  • adds commas as thousands separator
  • adds a plus sign to numbers in the range 0 through 999, to avoid numeric sorting mode if the number is at the top (which would not work due to the commas in other numbers)
  • leftpads with nbsps to 11 characters

See also Help:Sorting.