mirror of
https://github.com/koreader/koreader
synced 2024-10-31 21:20:20 +00:00
17 lines
303 B
Lua
17 lines
303 B
Lua
lua_gettext.init("./i18n", "koreader")
|
|
|
|
local GetText = {}
|
|
local GetText_mt = {}
|
|
|
|
function GetText_mt.__call(gettext, string)
|
|
return lua_gettext.translate(string)
|
|
end
|
|
|
|
function GetText.changeLang(new_lang)
|
|
lua_gettext.change_lang(new_lang)
|
|
end
|
|
|
|
setmetatable(GetText, GetText_mt)
|
|
|
|
return GetText
|