Module:Multilingual description/sort/sandbox/උපදෙස්
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 LTR alphabets, Indic, Other South Asian, Syllabaries, Hangul, Japanese scripts, Sinograms, vertical scripts (rendered horizontally LTR, unless explicitly rotated by style), (RTL) Hebrew, Arabic, Divehi, N'Ko.
You can see a comprehensive test of rendering (and other checks) of language codes and native names on Module talk:Multilingual description/sort/testcases/sandbox: the table will be sorted accordingly (If you see green rows at the bottom, there are missing languages to add into this sort list).
Additionally you should map the writing directions ("rtl" or "ltr") of all these languages in Module:Dir/RTL overrides/sandbox to avoid fallbacks to a costly MediaWiki API (if it knows the language) or a last-chance fallback to "ltr" (which may be incorrect).