Difference between revisions of "Module:Data/static/language"
(Language data manager.) |
m (Remove call to sandbox code.) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
-- <pre> | -- <pre> | ||
− | |||
local thisData = mw.loadData( 'Module:Data/static/language/data' ) | local thisData = mw.loadData( 'Module:Data/static/language/data' ) | ||
− | local | + | local DATA = require( 'Module:Data' ) |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
return function( v ) | return function( v ) | ||
return thisData.main[ | return thisData.main[ | ||
thisData.normalize[ | thisData.normalize[ | ||
− | + | ( DATA.getRegion( v ) or {} ).index | |
− | |||
− | |||
] | ] | ||
] | ] | ||
end | end | ||
-- </pre> | -- </pre> |
Latest revision as of 12:14, 9 January 2020
-- <pre>
local thisData = mw.loadData( 'Module:Data/static/language/data' )
local DATA = require( 'Module:Data' )
return function( v )
return thisData.main[
thisData.normalize[
( DATA.getRegion( v ) or {} ).index
]
]
end
-- </pre>