mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
luasettings: new module to handle genric settings
also use luasettings for reader settings
This commit is contained in:
@@ -25,12 +25,12 @@ if ffi.os == "Windows" then
|
||||
ffi.C._putenv("PATH=libs;common;")
|
||||
end
|
||||
|
||||
local DocSettings = require("docsettings")
|
||||
local _ = require("gettext")
|
||||
-- read settings and check for language override
|
||||
-- has to be done before requiring other files because
|
||||
-- they might call gettext on load
|
||||
G_reader_settings = DocSettings:open(".reader")
|
||||
G_reader_settings = require("luasettings"):open(
|
||||
DataStorage:getDataDir().."/settings.reader.lua")
|
||||
local lang_locale = G_reader_settings:readSetting("language")
|
||||
if lang_locale then
|
||||
_.changeLang(lang_locale)
|
||||
|
||||
Reference in New Issue
Block a user