tekkub / controlfreak

WoW Addon - Crowd control assistance

This URL has Read+Write access

controlfreak / Locale.lua
100644 41 lines (30 sloc) 1.17 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

 
----------------------------------------------------------------
-- BIG BOLD CAPS NOTE! --
-- Localizations for macros do not belong here! --
-- Create localized profiles in ClassMacrotexts.lua --
----------------------------------------------------------------
 
local localized
local loc = GetLocale()
 
 
-----------------------
-- Engrish --
-----------------------
 
local engrish = {}
 
 
----------------------
-- German --
----------------------
 
if loc == "deDE" then localized = {
Beast = "Wildtier",
Demon = "Dämon",
Elemental = "Elementar",
Dragonkin = "Drachkin",
Giant = "Riese",
Humanoid = "Humanoid",
Mechanical = "Mechanisch",
Undead = "Untoter",
Unknown = "Nicht Spezifiziert",
} end
 
 
-- Metatable majicks... makes localized table fallback to engrish, or fallback to the index requested.
-- This ensures we ALWAYS get a value back, even if it's the index we requested originally
CONTROLFREAK_LOCALE = localized and setmetatable(localized, {__index = function(t,i) return engrish[i] or i end})
or setmetatable(engrish, {__index = function(t,i) return i end})