You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
local p = {}
function p.localize( strToTrans, page )
local frame = mw.getCurrentFrame()
if ( strToTrans == nil or strToTrans == '' ) then
mw.log( 'Utilities.localize: There is no string to translate! Returning empty string.' )
return ''
end
mw.log( 'Utilities.localize (strToTrans, page - input): '..strToTrans..', '..tostring(page) )
if ( page == nil or page == '' ) then
page = 'All'
end
mw.log('Utilities.localize (page - checked): '..page)
-- called every time ... shouldn't be a time issue needs between 40 and 80 microseconds
-- local langSuffix = frame:expandTemplate{ title = 'GetLangSuffix' }
-- local langSuffix = frame:expandTemplate{ title = 'PAGELANGUAGE' }
local langSuffix = mw.language.getContentLanguage()
-- local langSuffix = frame:preprocess( '/{{PAGELANGUAGE}}' )
mw.log('Utilities.localize (langSuffix): '..langSuffix)
000
1:0
Template used on this page:
Return to Module:Utilities.