La documentación para este módulo puede ser creada en Módulo:Translator/doc

-- Contains functions for translating English terms into Russian for interwiki links
-- <pre>

local p = {}
 
-- Dependencies
local lib = require('Módulo:Feature')

-- Returns Russian name of existing champion
function p.getChampionNameRU(frame)
    local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end
        
    local champion      = args['champion'] or args[1]
    local championTable = mw.loadData('Módulo:Translator/ChampionNamesRU')
    
    return championTable[champion]
end

-- Creates interwiki link for champion subpage, on which this function is invoked
function p.getInterwikiLinkRU(frame)
    local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end

    local subpageTable = {
        ["Habilidades"]  = "Умения",
        ["Estrategia"]   = "Умения",
        ["Historia"]     = "Биография",
        ["Frases"]       = "Фразы",
        ["Historial"]    = "История изменений",
        ["Desarrollo"]   = "Разработка",
        ["Aspectos"]     = "Образы",
        ["Curiosidades"] = "Прочее",
        ["LOR"]          = "LoR",
        ["TFT"]          = "TFT"
    }
    local thisTitle  = mw.title.getCurrentTitle()
    local ruChampion = p.getChampionNameRU{thisTitle.rootText}
    local ruSubpage  = subpageTable[mw.title.getCurrentTitle().subpageText]
    
    if ruChampion == nil then
        return ""
    elseif ruSubpage == nil then
        return frame:preprocess('[[ru:' .. ruChampion .. ']]')
    else
        return frame:preprocess('[[ru:' .. ruChampion .. "/" .. ruSubpage .. ']]')
    end
end

return p
-- </pre>
-- [[Categoría:Lua]]
El contenido de la comunidad está disponible bajo CC-BY-SA a menos que se indique lo contrario.