Previously this module generated a static list like this:

p.list = {'zgh-latn', 'sma', 'nan-hant', 'apc', 'mui', 'ace', 'btm', 'als', 'ms', 'abs', 'map-bms', 'ast', 'id', 'ase', 'bjn', 'gn', 'ang', 'af', 'en-gb', 'az', 'atj', 'gor', 'an', 'bug', 'rup', 'ay', 'smn', 'bi', 'bew', 'bar', 'bcl', 'bbc', 'bs', 'zh-min-nan', 'en-ca', 'frp', 'roa-rup', 'aae', 'bm', 'ban', 'gsw', 'nan', 'br', 'kge', 'bbc-latn', 'sje', 'bdr', 'brh', 'cps', 'eu', 'ibb', 'hil', 'jbo', 'pcm', 'se-no', 'hu', 'min', 'cdo', 'se', 'fat', 'ku', 'lad', 'nah', 'se-fi', 'ilo', 'lv', 'kai', 'niu', 'pam', 'mad', 'nys', 'lij', 'gaa', 'fit', 'gom-latn', 'mnc-latn', 'frr', 'gv', 'sw', 'gcf', 'jv', 'dsb', 'csb', 'ho', 'eo', 'nn', 'eml', 'it', 'co', 'kw', 'ku-latn', 'ik', 'dga', 'rw', 'ht', 'guw', 'ext', 'ha', 'ia', 'hrx', 'fj', 'da', 'kj', 'gag', 'krj', 'kea', 'xh', 'et', 'uz-latn', 'pdc', 'ny', 'lld', 'kri', 'vmf', 'wls', 'de-formal', 'mi', 'sms', 'ki', 'lfn', 'dtp', 'ann', 'ch', 'haw', 'nmz', 'nv', 'ceb', 'la', 'olo', 'fy', 'es', 'tum', 'mh', 'cy', 'lzz', 'na', 'lus', 'mus', 'pih', 'hif', 'mt', 'lg', 'kg', 'zu', 'mg', 'cho', 'ig', 'liv', 'cbk-zam', 'uz', 'mos', 'chn', 'gcr', 'kus', 'ff', 'dag', 'egl', 'kbp', 'igl', 'gl', 'kl', 'jut', 'nl', 'ltg', 'vmw', 'nov', 'ee', 'de', 'frc', 'nrm', 'nds-nl', 'nia', 'sm', 'ga', 'ie', 'en', 'ln', 'sn', 'mwl', 'rn', 'es-419', 'lt', 'nl-informal', 'hsb', 'ca', 'hif-latn', 'nap', 'fur', 'gd', 'fo', 'efi', 'io', 'bto', 'yrl', 'is', 'no', 'nb', 'to', 'lb', 'arn', 'gur', 'es-formal', 'krl', 'se-se', 'gpe', 'mrh', 'aln', 'ses', 'cs', 'ike-latn', 'fr', 'hr', 'kr', 'fon', 'kiu', 'lmo', 'avk', 'cr', 'hu-formal', 'sei', 'li', 'oc', 'ar', 'tru', 'sr', 'prg', 'nds', 'kk-latn', 'sq', 'crh-latn', 'arz', 'shy-latn', 'or', 'ary', 'luz', 'be-tarask', 'mr', 'vep', 'as', 'ts', 'rmc', 'mnc', 'ur', 'pnb', 'bo', 'nso', 'kk-kz', 'sty', 'tok', 'ss', 'kk-cn', 'ps', 'roa-tara', 'pnt', 'trv', 'so', 'ks', 'mo', 'tpi', 'dty', 'sh-cyrl', 'lo', 'ko', 'sd', 'srn', 'tt-latn', 'alt', 'skr-arab', 'sro', 'lrc', 'yi', 'yue-hant', 'tzm', 'inh', 'tg-cyrl', 'te', 'tn', 'mn', 'pdt', 'vro', 'kn', 'ryu', 'he', 'wuu-hans', 'nqo', 'kk-tr', 'am', 'mhr', 'got', 'gom-deva', 'qug', 'ne', 'rm', 'be', 'om', 'nod', 'km', 'arc', 'ce', 'mni', 'hsn', 'nyo', 'crh-ro', 'cpx-latn', 'yo', 'vo', 'new', 'sl', 'tl', 'chr', 'pl', 'ml', 'mnw', 'ckb', 'vot', 'rut', 'el', 'ku-arab', 'pt-br', 'shn', 'loz', 'bgn', 'shi', 'za', 'zh-cn', 'pap', 'ug', 'bho', 'sg', 'dz', 'tg', 'hz', 'ojb', 'ng', 'bg', 'bpy', 'ady-cyrl', 'kk', 'zh-tw', 'zh-sg', 'zh-my', 'zh-mo', 'ro', 'my', 'yue', 'ky', 'ko-kp', 'zh-hans', 'guc', 'zgh', 'sh-latn', 'zea', 'de-ch', 'vec', 'yue-hans', 'tly', 'hy', 'xsy', 'sh', 'pwn', 'xmf', 'tet', 'nyn', 'shi-tfng', 'wuu-hant', 'bh', 'szy', 'os', 'wuu', 'arq', 'wo', 'ksh', 'tg-latn', 'mrj', 'sdh', 'war', 'fi', 'vls', 'mnc-mong', 'tw', 'bat-smg', 'ady', 'hi', 'si', 'hno', 'vi', 'pfl', 'ti', 've', 'zh', 'uz-cyrl', 'gom', 'uk', 'ks-deva', 'ug-latn', 'ug-arab', 'kum', 'udm', 'zh-classical', 'koi', 'be-x-old', 'rue', 'fa', 'lzh', 'ka', 'myv', 'gan-hans', 'gan-hant', 'tyv', 'ty', 'pa', 'ttj', 'syl', 'tt-cyrl', 'jam', 'tr', 'sgs', 'mk', 'rmy', 'th', 'tk', 'ksw', 'sk', 'ban-bali', 'zh-hk', 'kcg', 'fiu-vro', 'sv', 'szl', 'bci', 'rsk', 'zh-hant', 'sah', 'anp', 'tcy', 'rgn', 'kab', 'ike-cans', 'kbd', 'lez', 'lbe', 'su', 'kaa', 'cv', 'dv', 'ks-arab', 'sat', 'kjp', 'rif', 'mai', 'sr-el', 'kv', 'shi-latn', 'gan', 'gld', 'diq', 'din', 'sco', 'shy', 'kk-cyrl', 'kjh', 'skr', 'kk-arab', 'chy', 'grc', 'av', 'simple', 'aeb-arab', 'aeb-latn', 'mzn', 'mdf', 'bqi', 'iu', 'acm', 'gu', 'kbd-cyrl', 'bxr', 'tdd', 'pcd', 'azb', 'qu', 'aeb', 'crh-cyrl', 'sdc', 'lki', 'ruq-latn', 'bcc', 'ruq-cyrl', 'nit', 'de-at', 'ru', 'rki', 'zh-yue', 'st', 'tt', 'stq', 'mag', 'tay', 'pag', 'tly-cyrl', 'awa', 'sjd', 'pms', 'scn', 'pi', 'hak', 'cpx-hans', 'ta', 'wa', 'ruq', 'cpx', 'sa', 'nog', 'ja', 'pt', 'sr-ec', 'ii', 'aa', 'ba', 'hyw', 'ami', 'wal', 'ms-arab', 'xal', 'sli', 'glk', 'krc', 'blk', 'ab', 'khw', 'cpx-hant', 'cu', 'sc', 'crh', 'bn'}

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.

සැකිල්ල:Tracked 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.

"https://si.wikibooks.org/w/index.php?title=Module:Languages/List/උපදෙස්&oldid=23889" වෙතින් සම්ප්‍රවේශනය කෙරිණි