Quantcast

Made local GetLocale function return enUS if locale is enGB.

F16Gaming [07-03-12 - 08:41]
Made local GetLocale function return enUS if locale is enGB.
Filename
LocaleManager.lua
diff --git a/LocaleManager.lua b/LocaleManager.lua
index c03035e..9489553 100644
--- a/LocaleManager.lua
+++ b/LocaleManager.lua
@@ -1,18 +1,18 @@
 --[[
 	* Copyright (c) 2011-2012 by Adam Hellberg.
-	*
+	*
 	* This file is part of Command.
-	*
+	*
 	* Command is free software: you can redistribute it and/or modify
 	* it under the terms of the GNU General Public License as published by
 	* the Free Software Foundation, either version 3 of the License, or
 	* (at your option) any later version.
-	*
+	*
 	* Command is distributed in the hope that it will be useful,
 	* but WITHOUT ANY WARRANTY; without even the implied warranty of
 	* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 	* GNU General Public License for more details.
-	*
+	*
 	* You should have received a copy of the GNU General Public License
 	* along with Command. If not, see <http://www.gnu.org/licenses/>.
 --]]
@@ -26,6 +26,14 @@ local pairs = pairs
 local tostring = tostring
 local setmetatable = setmetatable

+-- Custom GetLocale()
+local BlizzGetLocale = GetLocale
+local GetLocale = function()
+	local l = BlizzGetLocale()
+	if l == "enGB" then l = "enUS" end
+	return l
+end
+
 local C = Command

 C.LocaleManager = {