Page MenuHomePhabricator

Sorting language pane by article size
Open, LowPublic


Author: ymeroz

Typically, versions of a given article in different languages vary in detail. It is no longer the case that the English version is the
canonical, or the most detailed one.

For us multilingual readers, it would be handy to have an option to sort the language pane for a given article by some metric of
detail, for example word count or character count (depending on the language).

Another possibility is to give a list of, say, the three longest versions, at the bottom of the language list.

Version: unspecified
Severity: enhancement



Related Objects

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:18 PM
bzimport set Reference to bz6559.
bzimport added a subscriber: Unknown Object (MLST).

That would need DB access for all the interwikied wikis, plus the page length is
not AFAIK easy to compute (even worse for the word count!)
This would be most times unused because sorting would be done for each view,
while users are not going to pay much attention to it.

Could be a nice project for JavaScript

That information is not available for JavaScript either.

(In reply to comment #2)

That information is not available for JavaScript either.

I'm not so sure. The pagelength is stored in the revision table, and is available through the API with the 'info' propeties module as the 'lenght' prop [2].

A JavaScript gadget could get the languagelinks from the document, make API requests to those wikis to retrieve the page length and do something with it (ie. display it next to the link, put it in the tooltip, change the size of the text and sort by it, change the background color relatively, you name it).

The size of the current page coud be taken into account as well. eg:


  • Dutch (+10)
  • English (+401) // biggest article
  • German (+12)
  • Spanish (+0) // same size as current article
  • Frysian (-1) // smallest article
  • Chinese (+21)

Lots of possiblities :0



Pagelength is bytes which is useless for length comparison.

I was wrong 5 years ago. rev_len was added in r20222 (2007) but page_len in r7653 (2005).
The bytes parameter could be transformed with an approximation (eg. Chinese articles of the same length use ~3x bytes than English).

Seems something to add when the interwiki system is changed (Interlanguage extension?), where it would be easy to add the real length.