{{NUMBEROFARTICLES}} is not formatted according to user language
Closed, DeclinedPublic


Author: dbenbenn

On the Commons, {{NUMBEROFARTICLES}} displays with a comma as the numeric
separator: 29,949. That's fine for English, but Spanish wants to use . and
other languages might use other separators. MediaWiki currently has a very
inflexible support for different separators in a few cases. For example,
[[MediaWiki:Sitestatstext]] takes variable $2 which is NUMBEROFARTICLES with the
localized separator.

A more flexible solution would be if {{NUMBEROFARTICLES|.}} did the obvious
thing (the variable acts like a template, and uses the first argument as the
separator). Then we could localize that number in places that MediaWiki hasn't
thought of, for example the Spanish version of the Main Page, [[Commons:Portada]].

Obviously the same issue applies to all other numeric variables.

Version: unspecified
Severity: minor

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz5662.
bzimport created this task.Via LegacyApr 19 2006, 11:18 PM
hashar added a comment.Via ConduitApr 20 2006, 8:17 PM

On the special page:
we use $wgLang which can be the user prefered language, that's why
the numbers are correctly formatted.

But {{NUMBEROFARTICLES}} in an article or in a template is formatted
using $wgContLang which is the site language for content. There is
only one such language which is english for commons.

There is no real way to fix this issue :/

bzimport added a comment.Via ConduitApr 20 2006, 9:26 PM

dbenbenn wrote:

What's wrong with my proposed solution, taking the separator as a parameter?
That is certainly within the realm of possibility, whether or not it is feasible
in the current MediaWiki code.

bzimport added a comment.Via ConduitApr 21 2006, 8:29 AM

sanbec wrote:

To close wiht a "WONTFIX" is not a good solution. There are many solutions: the
proposed by David or i.e. to force the variable to use the language defined in a
parameter, instead the predetermined by $wgContLang

{{NUMBEROFARTICLES}} uses the $wgContLang localization

{{NUMBEROFARTICLES|es}} (or {{NUMBEROFARTICLES/es}}) uses the spanish localization
{{NUMBEROFARTICLES|en}} uses the english localization

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.