Anonymous

Module:Nomenclature: Difference between revisions

From Zelda Wiki, the Zelda encyclopedia
m
no edit summary
m (bugfix)
mNo edit summary
Line 96: Line 96:


function h.SortTranslations(translations)
function h.SortTranslations(translations)
local lookupLang = utilsTable.hash(utilsLanguage.getCodes())
local lookupLang = utilsTable.invert(utilsLanguage.getCodes())
local lookupGame = utilsTable.hash(utilsGame.GetSortOrder("canon"))
local lookupGame = utilsTable.invert(utilsGame.GetSortOrder("canon"))
table.sort(translations, function (a,b)
table.sort(translations, function (a,b)
if (lookupLang[a.language] or 0) == (lookupLang[b.language] or 0) then
if (lookupLang[a.language] or 0) == (lookupLang[b.language] or 0) then