2
0
mirror of https://github.com/koreader/koreader synced 2024-11-16 06:12:56 +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