lang: improve data handling

This commit is contained in:
Kazhnuz 2019-04-13 19:00:03 +02:00
parent 1c51b35112
commit 1e215a99bf

View file

@ -32,7 +32,7 @@ local TRANSLATION_PATH = "datas/languages/"
function LanguageManager:new(controller)
self.controller = controller
self.datas = self:getTranslationData()
self.data = self:getTranslationData()
self:setLang(self.controller.options.data.language.current)
end
@ -44,6 +44,14 @@ end
-- INFO FUNCTIONS
-- Get informations from the translation manager
function LanguageManager:getCurrentLang()
return self.data.language.current
end
function LanguageManager:getDefaultLang()
return self.data.language.default
end
function LanguageManager:getTranslationData()
return self.controller.options.data.language
end