Module:Languages/List/doc

Previously this module generated a static list like this:

Now this list is generated from the internal list of supported languages in the local instance of MediaWiki, which is then sorted by native name of each language in its primary script (LTR scripts are sorted before RTL scripts, language names in the same script are sorted together.

The order is also consistant with Module:Multilingual description which has its own comprehensive tests for the sort order of the list, its completeness (all language codes supported by the local instance of Mediawiki, plus some known aliases needed for BCP 47 conformance or for compatibility with past versions of this wiki even if they are not supported now and not shown in the list above), as well as for the directionality of each language.

Note that as of 2020-10-18, there's a new bug in Scribunto, which causes the standard "table.sort" function to no longer accept a standard comparison function. Now when "table.sort" fails, the error is correctly catched (instead of producing a viabile error), but the list may not be sorted correctly (temporarily) in some cases. The bug is tracked and corrected in Mediawiki but waiting to be deployed with the fix. Nothing will need to be changed (using "perror" will then no longer have any effect, it is just needed for now and the bug was not a bug of this module which was properly tested and sudddently failed unexpectedly). Thanks.