15 lines
321 B
Lua
15 lines
321 B
Lua
local t = {}
|
|
|
|
local fallbackString = function( t, s )
|
|
return "!UNLOCALISED STRING!: "..tostring( s )
|
|
end
|
|
|
|
function t.setLanguage( name )
|
|
name = name or "en"
|
|
setmetatable( t, {__index =
|
|
setmetatable( require( "i18n."..name ), {__index =
|
|
fallbackString } ) } )
|
|
return t
|
|
end
|
|
|
|
return t.setLanguage( "en" ) |