Module:sq-utilities
ការរចនា
Documentation for this module may be created at Module:sq-utilities/doc
--[[
Utilities for Albanian and related languages.
]]
local M={}
local tt={
["â"]="a",['Â']='A', ["ã"]="a",['Ã']='A', ["ä"]="a",["Ä"]='A',
["ë"]="e",['Ë']='E', ["ê"]="e",['Ê']='E', ["ẽ"]="e",['Ẽ']='E',
["ĩ"]="i",['Ĩ']='I',
["õ"]="o",['Õ']='O',
["ũ"]="u",['Ũ']='U',
["ỹ"]="y",['Ỹ']='Y',
["ç"]="c",['Ç']='C',
["'"]="",['’']='', ["-"]=" "
};
function M.sort(f)--reduce any words or phrases to sorting order form
return (mw.ustring.gsub(f.args[1], '.', tt))
-- for one-string data:
-- return (mw.ustring.gsub(f.args[1],'.',function(c) if not c:match('^%p') then return tt:match(c..'=(..?)\n') end end)
end
return M