lang: improve data handling
This commit is contained in:
parent
1c51b35112
commit
1e215a99bf
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue