มอดูล:alt-sortkey

จาก วิกิพจนานุกรม พจนานุกรมเสรี
local export = {}
local u = mw.ustring.char
local a = u(0xF000)

local monographs = {
	["ј"] = "д" .. a, ["ё"] = "е" .. a, ["ҥ"] = "н" .. a, ["ӧ"] = "о" .. a, ["ӱ"] = "у" .. a
}

function export.makeSortKey(text, lang, sc)
	for from, to in pairs(monographs) do
		text = mw.ustring.gsub(text, from, to)
	end
	
	return text
end

return export