lang: add a way to check language availability

This commit is contained in:
Kazhnuz 2019-04-14 18:11:31 +02:00
parent cdf088e2a1
commit a470f53f8f

View file

@ -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