lang: add a way to check language availability
This commit is contained in:
parent
cdf088e2a1
commit
a470f53f8f
1 changed files with 12 additions and 0 deletions
|
@ -72,6 +72,18 @@ function LanguageManager:getCurrentLangName()
|
|||
return self:getLangName(self.data.current)
|
||||
end
|
||||
|
||||
function LanguageManager:isLangAvailable(lang)
|
||||
local isAvailable = false
|
||||
|
||||
for i,v in ipairs(self.data.available) do
|
||||
if v == lang then
|
||||
isAvailable = true
|
||||
end
|
||||
end
|
||||
|
||||
return isAvailable
|
||||
end
|
||||
|
||||
-- TRANSLATION FUNCTIONS
|
||||
-- get the translation of a string
|
||||
|
||||
|
|
Loading…
Reference in a new issue