Open main menu
CodeDiscussionEditHistoryLinksLink countQuick tests passed Subpages:DocumentationTestsResultsSandboxLive code All modules

Ordered by direction (all LTR scripts first, then RTL scripts), then by script, then alphabetically (by name) in each script.

Latin, Latin or Cyrillic, Cyrillic, Greek, Other simple LTR alphabets, Indic, Other South Asian, Syllabaries, Hangul, Japanese scripts, Sinograms, (RTL) Hebrew, (RTL) Arabic

You can see a comprehensive test of rendering (and other checks) of language codes and native names on Module talk:Multilingual description/sort/testcases: the table will be sorted accordingly (If you see green rows at the bottom, there are missing languages to add into this sort list).


  The documented sort order is by script, then alphabetically by displayed native name (as generated by {{#language: code}}), using the default DUCET order.
  This allows easier selection by users reading the lists of languages in order to find their own.
  Please test this order, and maintain it as complete as possible, including legacy codes still used in MediaWiki.
  Any missing language will be sorted after all languages listed below, just using its internal language code.
local p = {
-- LTR scripts
  -- Latin alphabets
    --[[A]] 'sma', 'ace', 'ang', 'af', 'ak', 'gsw', 'als', 'ase', 'an', 'rup', 'roa-rup', 'frp', 'ast', 'atj', 'gn', 'ay', 'az',
    --[[B]] 'abs', 'bjn', 'gor', 'id', 'ms', 'bm', 'nan', 'zh-min-nan', 'ban', 'map-bms', 'jv', 'su', 'min', 'btm', 'bbc', 'bbc-latn', 'bcl', 'bi', 'bar', 'bs', 'brh', 'br', 'en-gb',
    --[[C]] 'en-ca', 'cps', 'ca', 'ceb', 'cs', 'ch', 'cbk-zam', 'ny', 'sn', 'tum', 'cho', 'sei', 'co', 'cy',
    --[[D]] 'da', 'pdc', 'de', 'de-formal', 'nv', 'dsb', 'na', 'dtp',
    --[[E]] 'mh', 'et', 'egl', 'eml', 'en', 'es', 'es-formal', 'es-419', 'eo', 'ext', 'eu', 'ee',
    --[[F]] 'hif', 'hif-latn', 'fo', 'fr', 'frc', 'fy', 'ff', 'fur',
    --[[G]] 'ga', 'gv', 'sm', 'gag', 'gd', 'gl', 'aln', 'ki', 'gom-latn',
    --[[H]] 'ha', 'ha-latn', 'haw', 'ho', 'hsb', 'hr', 'hrx',
    --[[I]] 'io', 'ig', 'ilo', 'hil', 'ia', 'ie', 'ike-latn', 'ik', 'bto', 'xh', 'zu', 'is', 'it',
    --[[J]] 'jut',
    --[[K]] 'kbp', 'kl', 'kr', 'pam', 'krl', 'csb', 'kw', 'krj', 'rw', 'kiu', 'rn', 'sw', 'kg', 'avk', 'ses', 'ht', 'gcf', 'kri', 'gcr', 'ku', 'ku-latn', 'kj',
    --[[L]] 'lad', 'ltg', 'la', 'lv', 'lzz', 'to', 'lb', 'lt', 'lij', 'li', 'ln', 'lfn', 'liv', 'olo', 'jbo', 'lg', 'lmo',
    --[[M]] 'ary', 'hu', 'hu-formal', 'vmf', 'mg', 'mt', 'mi', 'arn', 'fit', 'cdo', 'mwl', 'lus', 'mus',
    --[[N]] 'fj', 'nah', 'nap', 'nl', 'nl-informal', 'nds-nl', 'cr', 'niu', 'frr', 'pih', 'no', 'nb', 'nn', 'nrm', 'nov', 'nys',
    --[[O]] 'oc', 'om', 'ng', 'de-at', 'hz', 'uz', 'uz-latn',
    --[[P]] 'pfl', 'pag', 'pap', 'jam', 'pcd', 'pms', 'nds', 'pdt', 'pl', 'pt', 'pt-br', 'prg',
    --[[Q]] 'aa', 'kaa', 'kk-latn', 'kk-tr', 'crh', 'crh-latn',
    --[[R]] 'ty', 'ksh', 'ro', 'rmy', 'rgn', 'rm', 'qug', 'qu',
    --[[S]] 'se', 'sg', 'xsy', 'sc', 'sdc', 'sli', 'de-ch', 'sco', 'stq', 'st', 'nso', 'tn', 'sq', 'scn', 'loz', 'simple', 'ss', 'sk', 'sl', 'szl', 'so', 'srn', 'sr-latn', 'sr-el', 'fi', 'sv',
    --[[T]] 'shy-latn', 'tl', 'tzl', 'kab', 'roa-tara', 'rif', 'shi', 'shi-latn', 'tt-latn', 'tay', 'tet', 'din', 'vi', 'tg-latn', 'tpi', 'tokipona', 'chy', 've', 'aeb-latn', 'tr', 'tk', 'tru', 'tw',
    --[[U]] 'ug-latn',
    --[[V]] 'vot', 'za', 'vec', 'vep', 'ruq', 'ruq-latn', 'vo', 'vro', 'fiu-vro',
    --[[W]] 'wa', 'vls', 'war', 'wo',
    --[[X]] 'ts',
    --[[Y]] 'yo',
    --[[Z]] 'diq', 'zea', 'sgs', 'bat-smg',
  -- Latin OR Cyrillic alphabets
    'sh', -- most often Latin
    'sr', -- most often Cyrillic
  -- Cyrillic alphabets
    --[[А]] 'av', 'ady', 'ady-cyrl', 'kbd', 'kbd-cyrl', 'ab',
    --[[Б]] 'ba', 'be', 'be-tarask', 'be-x-old', 'bxr', 'bg',
    --[[В]] 'ruq-cyrl',
    --[[Г]] 'inh',
    --[[И]] 'os',
    --[[К]] 'kv', 'krc', 'kum', 'crh-cyrl', 'ky', 'mrj', 'kk', 'kk-cyrl', 'kk-kz',
    --[[Л]] 'lbe', 'lez',
    --[[М]] 'mk', 'mdf', 'mo', 'mn',
    --[[Н]] 'ce',
    --[[О]] 'mhr',
    --[[П]] 'koi',
    --[[Р]] 'rue', 'ru',
    --[[C]] 'sah', 'sty', 'cu', 'sr-cyrl', 'sr-ec',
    --[[Т]] 'tt', 'tt-cyrl', 'tly', 'tg', 'tg-cyrl', 'tyv',
    --[[У]] 'udm', 'uz-cyrl', 'uk',
    --[[Х]] 'xal',
    --[[Ч]] 'cv',
    --[[Э]] 'myv',
  -- Greek or Coptic alphabets
    'grc', 'el', 'pnt', 'cop',
  -- Other European alphabets
    'hyw', 'hy', 'xmf', 'ka',
  -- Devanagari abugida
    'awa', 'anp', 'ks-deva', 'gom', 'gom-deva', 'new', 'ne', 'dty', 'pi', 'bho', 'bh', 'mr', 'mai', 'sa', 'hi',
  -- Other North Indian abugidas
    'as', 'bn', 'bpy', 'mni', 'pa',
  -- South Indian abugidas
    'gu', 'or', 'ta', 'te', 'kn', 'tcy', 'ml', 'si',
  -- Other South-East Asian abugidas, including Tibetan
    'th', 'kjp', 'mnw', 'my', 'shn', 'dz', 'bo', 'lo', 'km',
  -- North-Western syllabaries
    'ike-cans', 'iu', 'chr', 'got',
  -- African syllabaries
     'tzm', 'zgh', 'shi-tfng', 'rif', 'sjs', 'ti', 'am',
  -- Asian syllabaries
     'bug', 'sat', 'ii',
  -- Korean scripts (alphabet and sinograms) and Japanese scripts (syllabaries and sinograms)
    'ko', 'ko-kr', 'ko-kp', 'ja',
  -- Sinographic scripts (plus Bopomofo syllabary)
    'zh', 'zh-hans', 'zh-cn', 'zh-sg', 'zh-my', 'wuu', 'hak', 'yue', 'zh-yue', 'gan', 'gan-hans',
    'zh-hant', 'zh-tw',  'zh-mo', 'zh-hk', 'lzh', 'zh-classical', 'gan-hant',
-- RTL scripts
  -- Hebrew abjads
    'yi', 'ydd', 'he',
  -- Arabic abjads
    --[[ا]] 'ur', 'ar',
    --[[ب]] 'bqi', 'bgn', 'bcc',
    --[[پ]] 'ps', 'pnb',
    --[[ت]] 'azb', 'aeb', 'aeb-arab',
    --[[ج]] 'arq',
    --[[س]] 'sd', 'skr', 'skr-arab',
    --[[ف]] 'fa', 'fa-af', 'prd',
    --[[ق]] 'kk-arab', 'kk-cn',
    --[[ك]] 'ku-arab',
    --[[ک]] 'ks', 'ks-arab', 'khw', 'ckb', 'sdh',
    --[[گ]] 'glk',
    --[[ل]] 'lki', 'lrc', 'luz',
    --[[م]] 'mzn', 'arz',
    --[[ه]] 'ha-arab', 
    --[[ئ]] 'ug', 'ug-arab',
  -- Other semitics abjads
    'arc', 'dv', 'nqo',
-- Additions to sort

setmetatable(p, {
    quickTests = function()
        local i = 0
        for k, v in pairs(p) do
            if type(k) ~= 'number' or k < 1 or k ~= math.floor(k)
            or type(v) ~= 'string' or #v < 2 or #v > 16
            or (v):find('^[a-z][%-0-9a-z]*[0-9a-z]$') ~= 1 then
                return false, ': invalid sequence of language codes in p["' .. tostring(k) .. '"] = "' .. tostring(v) .. '"'
            i = i + 1
        if #p ~= i then return false, ': invalid sequence: length = '.. #p ' for ' .. i .. 'distinct keys' end
        return true
--[[ To test this module in the Lua console: -- must return true

return p