cache locales on startup, set enUS as default

This commit is contained in:
shagu
2016-08-15 19:32:46 +02:00
parent da44ac3381
commit d9ca439ee2
3 changed files with 28 additions and 17 deletions
+11
View File
@@ -20,6 +20,16 @@ end
pfUI = CreateFrame("Frame",nil,UIParent)
pfUI:RegisterEvent("ADDON_LOADED")
pfUI:SetScript("OnEvent", function()
pfUI.cache["locale"] = GetLocale()
if pfUI.cache["locale"] ~= "enUS" and
pfUI.cache["locale"] ~= "frFR" and
pfUI.cache["locale"] ~= "deDE" and
pfUI.cache["locale"] ~= "zhCN" and
pfUI.cache["locale"] ~= "ruRU" then
pfUI.cache["locale"] = "enUS"
end
pfUI:LoadConfig()
if arg1 == "pfUI" then
pfUI:Debug("pfUI module loader:")
@@ -32,6 +42,7 @@ pfUI:SetScript("OnEvent", function()
end
end)
pfUI.cache = {}
pfUI.module = {}
pfUI.modules = {}
pfLocaleClass = {}