2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
koreader/frontend/gettext.lua

17 lines
297 B
Lua
Raw Normal View History

2013-04-07 08:09:33 +00:00
lua_gettext.init("./i18n", "koreader")
2013-10-18 20:38:07 +00:00
local GetText = {}
local GetText_mt = {}
2013-04-07 08:09:33 +00:00
2013-10-18 20:38:07 +00:00
function GetText_mt.__call(gettext, string)
2013-04-07 08:09:33 +00:00
return lua_gettext.translate(string)
end
2013-10-18 20:38:07 +00:00
function GetText.changeLang(new_lang)
2013-04-07 08:09:33 +00:00
lua_gettext.change_lang(new_lang)
end
2013-10-18 20:38:07 +00:00
setmetatable(GetText, GetText_mt)
return GetText