Difference between revisions of "Module:Languages"
m |
|||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
+ | |||
+ | function p.page(frame) | ||
+ | return mw.title.getCurrentTitle() | ||
+ | end | ||
+ | |||
+ | function p.namespace(frame) | ||
+ | return mw.title.getCurrentTitle().nsText | ||
+ | end | ||
+ | |||
+ | function p.fullname(frame) | ||
+ | return p.namespace(frame) .. ":" .. p.page(frame) | ||
+ | end | ||
function p.languages(frame) | function p.languages(frame) | ||
− | + | local languages = {'ar', 'cs', 'da', 'de', 'es', 'fi', 'fr', 'hu', 'it', 'ja', 'ko', 'nl', 'no', 'pl', 'pt', 'pt-br', 'ro', 'ru', 'sv', 'tr', 'zh-hans', 'zh-hant'} | |
− | |||
− | |||
− | |||
− | |||
end | end | ||
return p | return p |
Revision as of 13:04, 11 February 2016
Documentation for this module may be created at Module:Languages/doc
local p = {} function p.page(frame) return mw.title.getCurrentTitle() end function p.namespace(frame) return mw.title.getCurrentTitle().nsText end function p.fullname(frame) return p.namespace(frame) .. ":" .. p.page(frame) end function p.languages(frame) local languages = {'ar', 'cs', 'da', 'de', 'es', 'fi', 'fr', 'hu', 'it', 'ja', 'ko', 'nl', 'no', 'pl', 'pt', 'pt-br', 'ro', 'ru', 'sv', 'tr', 'zh-hans', 'zh-hant'} end return p