Added menu entry to switch between languages
This commit is contained in:
1 parent
c36b180dec
commit
ff19520056
1 file changed
+21
-2
+21
-2
@@ -8,8 +8,27 @@ if ModConfigMenu then
|
|||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
ModConfigMenu.AddText("EID", "General", "Change Language in the Config file.")
|
-- Language
|
||||||
ModConfigMenu.AddSpace("EID", "General")
|
local displayLanguage = {"English", "English (detailed)", "French", "Portuguese", "Russian", "Spanish", "Bulgarian (WIP)", "Polish (WIP)", "Turkish (WIP)"}
|
||||||
|
local langLookup = {"en_us", "en_us_detailed", "fr", "pt", "ru", "spa", "bul", "pl", "turkish"}
|
||||||
|
ModConfigMenu.AddSetting(
|
||||||
|
"EID",
|
||||||
|
"General",
|
||||||
|
{
|
||||||
|
Type = ModConfigMenuOptionType.NUMBER,
|
||||||
|
CurrentSetting = function()
|
||||||
|
return AnIndexOf(langLookup, EIDConfig["Language"])
|
||||||
|
end,
|
||||||
|
Minimum = 1,
|
||||||
|
Maximum = #langLookup,
|
||||||
|
Display = function()
|
||||||
|
return "Language: " .. displayLanguage[AnIndexOf(langLookup, EIDConfig["Language"])]
|
||||||
|
end,
|
||||||
|
OnChange = function(currentNum)
|
||||||
|
EIDConfig["Language"] = langLookup[currentNum]
|
||||||
|
end
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
-- Disable on Curse
|
-- Disable on Curse
|
||||||
ModConfigMenu.AddSetting(
|
ModConfigMenu.AddSetting(
|
||||||
|
|||||||
Reference in new issue
Block a user