Global("texts", { })
Global("L", { })

-- AO game Localization detection by SLA. Version 2011-02-10.
function GetGameLocalization()
 local B = cartographer.GetMapBlocks()
 local T = { rus="\203\232\227\224", 
             eng="Holy Land", 
             ger="Heiliges Land",
             fra="Terre Sacr\233e", 
             br ="Terra Sagrada", 
             jpn="\131\74\131\106\131\65" }
 for b in B do 
   for l,t in T do
     if userMods.FromWString( cartographer.GetMapBlockInfo(B [b] ).name ) == t then
       return l 
     end
   end
 end
 return "eng"
end

function GetTextLocalized(strTextName, language)
  local textgroup = common.GetAddonRelatedTextGroup(language)
  if textgroup then
    return textgroup:GetText(strTextName)
  end
  return common.GetEmptyWString()
end

-- Load all localized texts
-- Load texts for language eng
texts["eng"] = { }
texts["eng"]["any"] = GetTextLocalized("any", "eng")
texts["eng"]["buff"] = GetTextLocalized("buff", "eng")
texts["eng"]["castedbyme"] = GetTextLocalized("castedbyme", "eng")
texts["eng"]["close"] = GetTextLocalized("close", "eng")
texts["eng"]["debuff"] = GetTextLocalized("debuff", "eng")
texts["eng"]["decreaseSymbol"] = GetTextLocalized("decreaseSymbol", "eng")
texts["eng"]["delete"] = GetTextLocalized("delete", "eng")
texts["eng"]["edit"] = GetTextLocalized("edit", "eng")
texts["eng"]["friendly"] = GetTextLocalized("friendly", "eng")
texts["eng"]["height"] = GetTextLocalized("height", "eng")
texts["eng"]["hide"] = GetTextLocalized("hide", "eng")
texts["eng"]["hostile"] = GetTextLocalized("hostile", "eng")
texts["eng"]["ifgroupmembernumber"] = GetTextLocalized("ifgroupmembernumber", "eng")
texts["eng"]["ifothervisible"] = GetTextLocalized("ifothervisible", "eng")
texts["eng"]["increaseSymbol"] = GetTextLocalized("increaseSymbol", "eng")
texts["eng"]["infight"] = GetTextLocalized("infight", "eng")
texts["eng"]["ingroup"] = GetTextLocalized("ingroup", "eng")
texts["eng"]["inraid"] = GetTextLocalized("inraid", "eng")
texts["eng"]["moreconditions"] = GetTextLocalized("moreconditions", "eng")
texts["eng"]["mounted"] = GetTextLocalized("mounted", "eng")
texts["eng"]["name"] = GetTextLocalized("name", "eng")
texts["eng"]["new"] = GetTextLocalized("new", "eng")
texts["eng"]["notinfight"] = GetTextLocalized("notinfight", "eng")
texts["eng"]["notmounted"] = GetTextLocalized("notmounted", "eng")
texts["eng"]["on"] = GetTextLocalized("on", "eng")
texts["eng"]["opacity"] = GetTextLocalized("opacity", "eng")
texts["eng"]["pauras"] = GetTextLocalized("pauras", "eng")
texts["eng"]["pet"] = GetTextLocalized("pet", "eng")
texts["eng"]["position"] = GetTextLocalized("position", "eng")
texts["eng"]["powerAuras"] = GetTextLocalized("powerAuras", "eng")
texts["eng"]["save"] = GetTextLocalized("save", "eng")
texts["eng"]["search"] = GetTextLocalized("search", "eng")
texts["eng"]["searchwindow"] = GetTextLocalized("searchwindow", "eng")
texts["eng"]["settings"] = GetTextLocalized("settings", "eng")
texts["eng"]["show"] = GetTextLocalized("show", "eng")
texts["eng"]["showImage"] = GetTextLocalized("showImage", "eng")
texts["eng"]["showTimer"] = GetTextLocalized("showTimer", "eng")
texts["eng"]["showBar"] = GetTextLocalized("showBar", "eng")
texts["eng"]["size"] = GetTextLocalized("size", "eng")
texts["eng"]["solo"] = GetTextLocalized("solo", "eng")
texts["eng"]["spellcd"] = GetTextLocalized("spellcd", "eng")
texts["eng"]["stackmax"] = GetTextLocalized("stackmax", "eng")
texts["eng"]["stackmin"] = GetTextLocalized("stackmin", "eng")
texts["eng"]["stacksize"] = GetTextLocalized("stacksize", "eng")
texts["eng"]["targetoftarget"] = GetTextLocalized("targetoftarget", "eng")
texts["eng"]["useBuffImage"] = GetTextLocalized("useBuffImage", "eng")
texts["eng"]["while"] = GetTextLocalized("while", "eng")
texts["eng"]["width"] = GetTextLocalized("width", "eng")
texts["eng"]["withExactName"] = GetTextLocalized("withExactName", "eng")
texts["eng"]["x"] = GetTextLocalized("x", "eng")
texts["eng"]["y"] = GetTextLocalized("y", "eng")
texts["eng"]["you"] = GetTextLocalized("you", "eng")
texts["eng"]["yourtarget"] = GetTextLocalized("yourtarget", "eng")
texts["eng"]["condition"] = GetTextLocalized("condition", "eng")
texts["eng"]["extendedcondition"] = GetTextLocalized("extendedcondition", "eng")
texts["eng"]["view"] = GetTextLocalized("view", "eng")
texts["eng"]["pageof"] = GetTextLocalized("pageof", "eng")
texts["eng"]["page"] = GetTextLocalized("page", "eng")
texts["eng"]["itemcd"] = GetTextLocalized("itemcd", "eng")
texts["eng"]["remaining"] = GetTextLocalized("remaining", "eng")
texts["eng"]["elapsed"] = GetTextLocalized("elapsed", "eng")
texts["eng"]["milliseconds"] = GetTextLocalized("milliseconds", "eng")
texts["eng"]["timer"] = GetTextLocalized("timer", "eng")
texts["eng"]["timermax"] = GetTextLocalized("timermax", "eng")
texts["eng"]["timermin"] = GetTextLocalized("timermin", "eng")
texts["eng"]["importexportexplanation"] = GetTextLocalized("importexportexplanation", "eng")
texts["eng"]["code"] = GetTextLocalized("code", "eng")
texts["eng"]["import"] = GetTextLocalized("import", "eng")
texts["eng"]["export"] = GetTextLocalized("export", "eng")
texts["eng"]["exportimport"] = GetTextLocalized("exportimport", "eng")
-- Load texts for language ger
texts["ger"] = { }
texts["ger"]["any"] = GetTextLocalized("any", "ger")
texts["ger"]["buff"] = GetTextLocalized("buff", "ger")
texts["ger"]["castedbyme"] = GetTextLocalized("castedbyme", "ger")
texts["ger"]["close"] = GetTextLocalized("close", "ger")
texts["ger"]["debuff"] = GetTextLocalized("debuff", "ger")
texts["ger"]["decreaseSymbol"] = GetTextLocalized("decreaseSymbol", "ger")
texts["ger"]["delete"] = GetTextLocalized("delete", "ger")
texts["ger"]["edit"] = GetTextLocalized("edit", "ger")
texts["ger"]["friendly"] = GetTextLocalized("friendly", "ger")
texts["ger"]["height"] = GetTextLocalized("height", "ger")
texts["ger"]["hide"] = GetTextLocalized("hide", "ger")
texts["ger"]["hostile"] = GetTextLocalized("hostile", "ger")
texts["ger"]["ifgroupmembernumber"] = GetTextLocalized("ifgroupmembernumber", "ger")
texts["ger"]["ifothervisible"] = GetTextLocalized("ifothervisible", "ger")
texts["ger"]["increaseSymbol"] = GetTextLocalized("increaseSymbol", "ger")
texts["ger"]["infight"] = GetTextLocalized("infight", "ger")
texts["ger"]["ingroup"] = GetTextLocalized("ingroup", "ger")
texts["ger"]["inraid"] = GetTextLocalized("inraid", "ger")
texts["ger"]["moreconditions"] = GetTextLocalized("moreconditions", "ger")
texts["ger"]["mounted"] = GetTextLocalized("mounted", "ger")
texts["ger"]["name"] = GetTextLocalized("name", "ger")
texts["ger"]["new"] = GetTextLocalized("new", "ger")
texts["ger"]["notinfight"] = GetTextLocalized("notinfight", "ger")
texts["ger"]["notmounted"] = GetTextLocalized("notmounted", "ger")
texts["ger"]["on"] = GetTextLocalized("on", "ger")
texts["ger"]["opacity"] = GetTextLocalized("opacity", "ger")
texts["ger"]["pauras"] = GetTextLocalized("pauras", "ger")
texts["ger"]["pet"] = GetTextLocalized("pet", "ger")
texts["ger"]["position"] = GetTextLocalized("position", "ger")
texts["ger"]["powerAuras"] = GetTextLocalized("powerAuras", "ger")
texts["ger"]["save"] = GetTextLocalized("save", "ger")
texts["ger"]["search"] = GetTextLocalized("search", "ger")
texts["ger"]["searchwindow"] = GetTextLocalized("searchwindow", "ger")
texts["ger"]["settings"] = GetTextLocalized("settings", "ger")
texts["ger"]["show"] = GetTextLocalized("show", "ger")
texts["ger"]["showImage"] = GetTextLocalized("showImage", "ger")
texts["ger"]["showTimer"] = GetTextLocalized("showTimer", "ger")
texts["ger"]["showBar"] = GetTextLocalized("showBar", "ger")
texts["ger"]["size"] = GetTextLocalized("size", "ger")
texts["ger"]["solo"] = GetTextLocalized("solo", "ger")
texts["ger"]["spellcd"] = GetTextLocalized("spellcd", "ger")
texts["ger"]["stackmax"] = GetTextLocalized("stackmax", "ger")
texts["ger"]["stackmin"] = GetTextLocalized("stackmin", "ger")
texts["ger"]["stacksize"] = GetTextLocalized("stacksize", "ger")
texts["ger"]["targetoftarget"] = GetTextLocalized("targetoftarget", "ger")
texts["ger"]["useBuffImage"] = GetTextLocalized("useBuffImage", "ger")
texts["ger"]["while"] = GetTextLocalized("while", "ger")
texts["ger"]["width"] = GetTextLocalized("width", "ger")
texts["ger"]["withExactName"] = GetTextLocalized("withExactName", "ger")
texts["ger"]["x"] = GetTextLocalized("x", "ger")
texts["ger"]["y"] = GetTextLocalized("y", "ger")
texts["ger"]["you"] = GetTextLocalized("you", "ger")
texts["ger"]["yourtarget"] = GetTextLocalized("yourtarget", "ger")
texts["ger"]["condition"] = GetTextLocalized("condition", "ger")
texts["ger"]["extendedcondition"] = GetTextLocalized("extendedcondition", "ger")
texts["ger"]["view"] = GetTextLocalized("view", "ger")
texts["ger"]["pageof"] = GetTextLocalized("pageof", "ger")
texts["ger"]["page"] = GetTextLocalized("page", "ger")
texts["ger"]["itemcd"] = GetTextLocalized("itemcd", "ger")
texts["ger"]["remaining"] = GetTextLocalized("remaining", "ger")
texts["ger"]["elapsed"] = GetTextLocalized("elapsed", "ger")
texts["ger"]["milliseconds"] = GetTextLocalized("milliseconds", "ger")
texts["ger"]["timer"] = GetTextLocalized("timer", "ger")
texts["ger"]["timermax"] = GetTextLocalized("timermax", "ger")
texts["ger"]["timermin"] = GetTextLocalized("timermin", "ger")
texts["ger"]["importexportexplanation"] = GetTextLocalized("importexportexplanation", "ger")
texts["ger"]["code"] = GetTextLocalized("code", "ger")
texts["ger"]["import"] = GetTextLocalized("import", "ger")
texts["ger"]["export"] = GetTextLocalized("export", "ger")
texts["ger"]["exportimport"] = GetTextLocalized("exportimport", "ger")
-- Load texts for language rus
texts["rus"] = { }
texts["rus"]["any"] = GetTextLocalized("any", "rus")
texts["rus"]["buff"] = GetTextLocalized("buff", "rus")
texts["rus"]["castedbyme"] = GetTextLocalized("castedbyme", "rus")
texts["rus"]["close"] = GetTextLocalized("close", "rus")
texts["rus"]["debuff"] = GetTextLocalized("debuff", "rus")
texts["rus"]["decreaseSymbol"] = GetTextLocalized("decreaseSymbol", "rus")
texts["rus"]["delete"] = GetTextLocalized("delete", "rus")
texts["rus"]["edit"] = GetTextLocalized("edit", "rus")
texts["rus"]["friendly"] = GetTextLocalized("friendly", "rus")
texts["rus"]["height"] = GetTextLocalized("height", "rus")
texts["rus"]["hide"] = GetTextLocalized("hide", "rus")
texts["rus"]["hostile"] = GetTextLocalized("hostile", "rus")
texts["rus"]["ifgroupmembernumber"] = GetTextLocalized("ifgroupmembernumber", "rus")
texts["rus"]["ifothervisible"] = GetTextLocalized("ifothervisible", "rus")
texts["rus"]["increaseSymbol"] = GetTextLocalized("increaseSymbol", "rus")
texts["rus"]["infight"] = GetTextLocalized("infight", "rus")
texts["rus"]["ingroup"] = GetTextLocalized("ingroup", "rus")
texts["rus"]["inraid"] = GetTextLocalized("inraid", "rus")
texts["rus"]["moreconditions"] = GetTextLocalized("moreconditions", "rus")
texts["rus"]["mounted"] = GetTextLocalized("mounted", "rus")
texts["rus"]["name"] = GetTextLocalized("name", "rus")
texts["rus"]["new"] = GetTextLocalized("new", "rus")
texts["rus"]["notinfight"] = GetTextLocalized("notinfight", "rus")
texts["rus"]["notmounted"] = GetTextLocalized("notmounted", "rus")
texts["rus"]["on"] = GetTextLocalized("on", "rus")
texts["rus"]["opacity"] = GetTextLocalized("opacity", "rus")
texts["rus"]["pauras"] = GetTextLocalized("pauras", "rus")
texts["rus"]["pet"] = GetTextLocalized("pet", "rus")
texts["rus"]["position"] = GetTextLocalized("position", "rus")
texts["rus"]["powerAuras"] = GetTextLocalized("powerAuras", "rus")
texts["rus"]["save"] = GetTextLocalized("save", "rus")
texts["rus"]["search"] = GetTextLocalized("search", "rus")
texts["rus"]["searchwindow"] = GetTextLocalized("searchwindow", "rus")
texts["rus"]["settings"] = GetTextLocalized("settings", "rus")
texts["rus"]["show"] = GetTextLocalized("show", "rus")
texts["rus"]["showImage"] = GetTextLocalized("showImage", "rus")
texts["rus"]["showTimer"] = GetTextLocalized("showTimer", "rus")
texts["rus"]["showBar"] = GetTextLocalized("showBar", "rus")
texts["rus"]["size"] = GetTextLocalized("size", "rus")
texts["rus"]["solo"] = GetTextLocalized("solo", "rus")
texts["rus"]["spellcd"] = GetTextLocalized("spellcd", "rus")
texts["rus"]["stackmax"] = GetTextLocalized("stackmax", "rus")
texts["rus"]["stackmin"] = GetTextLocalized("stackmin", "rus")
texts["rus"]["stacksize"] = GetTextLocalized("stacksize", "rus")
texts["rus"]["targetoftarget"] = GetTextLocalized("targetoftarget", "rus")
texts["rus"]["useBuffImage"] = GetTextLocalized("useBuffImage", "rus")
texts["rus"]["while"] = GetTextLocalized("while", "rus")
texts["rus"]["width"] = GetTextLocalized("width", "rus")
texts["rus"]["withExactName"] = GetTextLocalized("withExactName", "rus")
texts["rus"]["x"] = GetTextLocalized("x", "rus")
texts["rus"]["y"] = GetTextLocalized("y", "rus")
texts["rus"]["you"] = GetTextLocalized("you", "rus")
texts["rus"]["yourtarget"] = GetTextLocalized("yourtarget", "rus")
texts["rus"]["condition"] = GetTextLocalized("condition", "rus")
texts["rus"]["extendedcondition"] = GetTextLocalized("extendedcondition", "rus")
texts["rus"]["view"] = GetTextLocalized("view", "rus")
texts["rus"]["pageof"] = GetTextLocalized("pageof", "rus")
texts["rus"]["page"] = GetTextLocalized("page", "rus")
texts["rus"]["itemcd"] = GetTextLocalized("itemcd", "rus")
texts["rus"]["remaining"] = GetTextLocalized("remaining", "rus")
texts["rus"]["elapsed"] = GetTextLocalized("elapsed", "rus")
texts["rus"]["milliseconds"] = GetTextLocalized("milliseconds", "rus")
texts["rus"]["timer"] = GetTextLocalized("timer", "rus")
texts["rus"]["timermax"] = GetTextLocalized("timermax", "rus")
texts["rus"]["timermin"] = GetTextLocalized("timermin", "rus")
texts["rus"]["importexportexplanation"] = GetTextLocalized("importexportexplanation", "rus")
texts["rus"]["code"] = GetTextLocalized("code", "rus")
texts["rus"]["import"] = GetTextLocalized("import", "rus")
texts["rus"]["export"] = GetTextLocalized("export", "rus")
texts["rus"]["exportimport"] = GetTextLocalized("exportimport", "rus")
-- Load texts for language fra
texts["fra"] = { }
texts["fra"]["any"] = GetTextLocalized("any", "fra")
texts["fra"]["buff"] = GetTextLocalized("buff", "fra")
texts["fra"]["castedbyme"] = GetTextLocalized("castedbyme", "fra")
texts["fra"]["close"] = GetTextLocalized("close", "fra")
texts["fra"]["debuff"] = GetTextLocalized("debuff", "fra")
texts["fra"]["decreaseSymbol"] = GetTextLocalized("decreaseSymbol", "fra")
texts["fra"]["delete"] = GetTextLocalized("delete", "fra")
texts["fra"]["edit"] = GetTextLocalized("edit", "fra")
texts["fra"]["friendly"] = GetTextLocalized("friendly", "fra")
texts["fra"]["height"] = GetTextLocalized("height", "fra")
texts["fra"]["hide"] = GetTextLocalized("hide", "fra")
texts["fra"]["hostile"] = GetTextLocalized("hostile", "fra")
texts["fra"]["ifgroupmembernumber"] = GetTextLocalized("ifgroupmembernumber", "fra")
texts["fra"]["ifothervisible"] = GetTextLocalized("ifothervisible", "fra")
texts["fra"]["increaseSymbol"] = GetTextLocalized("increaseSymbol", "fra")
texts["fra"]["infight"] = GetTextLocalized("infight", "fra")
texts["fra"]["ingroup"] = GetTextLocalized("ingroup", "fra")
texts["fra"]["inraid"] = GetTextLocalized("inraid", "fra")
texts["fra"]["moreconditions"] = GetTextLocalized("moreconditions", "fra")
texts["fra"]["mounted"] = GetTextLocalized("mounted", "fra")
texts["fra"]["name"] = GetTextLocalized("name", "fra")
texts["fra"]["new"] = GetTextLocalized("new", "fra")
texts["fra"]["notinfight"] = GetTextLocalized("notinfight", "fra")
texts["fra"]["notmounted"] = GetTextLocalized("notmounted", "fra")
texts["fra"]["on"] = GetTextLocalized("on", "fra")
texts["fra"]["opacity"] = GetTextLocalized("opacity", "fra")
texts["fra"]["pauras"] = GetTextLocalized("pauras", "fra")
texts["fra"]["pet"] = GetTextLocalized("pet", "fra")
texts["fra"]["position"] = GetTextLocalized("position", "fra")
texts["fra"]["powerAuras"] = GetTextLocalized("powerAuras", "fra")
texts["fra"]["save"] = GetTextLocalized("save", "fra")
texts["fra"]["search"] = GetTextLocalized("search", "fra")
texts["fra"]["searchwindow"] = GetTextLocalized("searchwindow", "fra")
texts["fra"]["settings"] = GetTextLocalized("settings", "fra")
texts["fra"]["show"] = GetTextLocalized("show", "fra")
texts["fra"]["showImage"] = GetTextLocalized("showImage", "fra")
texts["fra"]["showTimer"] = GetTextLocalized("showTimer", "fra")
texts["fra"]["showBar"] = GetTextLocalized("showBar", "fra")
texts["fra"]["size"] = GetTextLocalized("size", "fra")
texts["fra"]["solo"] = GetTextLocalized("solo", "fra")
texts["fra"]["spellcd"] = GetTextLocalized("spellcd", "fra")
texts["fra"]["stackmax"] = GetTextLocalized("stackmax", "fra")
texts["fra"]["stackmin"] = GetTextLocalized("stackmin", "fra")
texts["fra"]["stacksize"] = GetTextLocalized("stacksize", "fra")
texts["fra"]["targetoftarget"] = GetTextLocalized("targetoftarget", "fra")
texts["fra"]["useBuffImage"] = GetTextLocalized("useBuffImage", "fra")
texts["fra"]["while"] = GetTextLocalized("while", "fra")
texts["fra"]["width"] = GetTextLocalized("width", "fra")
texts["fra"]["withExactName"] = GetTextLocalized("withExactName", "fra")
texts["fra"]["x"] = GetTextLocalized("x", "fra")
texts["fra"]["y"] = GetTextLocalized("y", "fra")
texts["fra"]["you"] = GetTextLocalized("you", "fra")
texts["fra"]["yourtarget"] = GetTextLocalized("yourtarget", "fra")
texts["fra"]["condition"] = GetTextLocalized("condition", "fra")
texts["fra"]["extendedcondition"] = GetTextLocalized("extendedcondition", "fra")
texts["fra"]["view"] = GetTextLocalized("view", "fra")
texts["fra"]["pageof"] = GetTextLocalized("pageof", "fra")
texts["fra"]["page"] = GetTextLocalized("page", "fra")
texts["fra"]["itemcd"] = GetTextLocalized("itemcd", "fra")
texts["fra"]["remaining"] = GetTextLocalized("remaining", "fra")
texts["fra"]["elapsed"] = GetTextLocalized("elapsed", "fra")
texts["fra"]["milliseconds"] = GetTextLocalized("milliseconds", "fra")
texts["fra"]["timer"] = GetTextLocalized("timer", "fra")
texts["fra"]["timermax"] = GetTextLocalized("timermax", "fra")
texts["fra"]["timermin"] = GetTextLocalized("timermin", "fra")
texts["fra"]["importexportexplanation"] = GetTextLocalized("importexportexplanation", "fra")
texts["fra"]["code"] = GetTextLocalized("code", "fra")
texts["fra"]["import"] = GetTextLocalized("import", "fra")
texts["fra"]["export"] = GetTextLocalized("export", "fra")
texts["fra"]["exportimport"] = GetTextLocalized("exportimport", "fra")
-- Load texts for language jpn
texts["jpn"] = { }
texts["jpn"]["any"] = GetTextLocalized("any", "jpn")
texts["jpn"]["buff"] = GetTextLocalized("buff", "jpn")
texts["jpn"]["castedbyme"] = GetTextLocalized("castedbyme", "jpn")
texts["jpn"]["close"] = GetTextLocalized("close", "jpn")
texts["jpn"]["debuff"] = GetTextLocalized("debuff", "jpn")
texts["jpn"]["decreaseSymbol"] = GetTextLocalized("decreaseSymbol", "jpn")
texts["jpn"]["delete"] = GetTextLocalized("delete", "jpn")
texts["jpn"]["edit"] = GetTextLocalized("edit", "jpn")
texts["jpn"]["friendly"] = GetTextLocalized("friendly", "jpn")
texts["jpn"]["height"] = GetTextLocalized("height", "jpn")
texts["jpn"]["hide"] = GetTextLocalized("hide", "jpn")
texts["jpn"]["hostile"] = GetTextLocalized("hostile", "jpn")
texts["jpn"]["ifgroupmembernumber"] = GetTextLocalized("ifgroupmembernumber", "jpn")
texts["jpn"]["ifothervisible"] = GetTextLocalized("ifothervisible", "jpn")
texts["jpn"]["increaseSymbol"] = GetTextLocalized("increaseSymbol", "jpn")
texts["jpn"]["infight"] = GetTextLocalized("infight", "jpn")
texts["jpn"]["ingroup"] = GetTextLocalized("ingroup", "jpn")
texts["jpn"]["inraid"] = GetTextLocalized("inraid", "jpn")
texts["jpn"]["moreconditions"] = GetTextLocalized("moreconditions", "jpn")
texts["jpn"]["mounted"] = GetTextLocalized("mounted", "jpn")
texts["jpn"]["name"] = GetTextLocalized("name", "jpn")
texts["jpn"]["new"] = GetTextLocalized("new", "jpn")
texts["jpn"]["notinfight"] = GetTextLocalized("notinfight", "jpn")
texts["jpn"]["notmounted"] = GetTextLocalized("notmounted", "jpn")
texts["jpn"]["on"] = GetTextLocalized("on", "jpn")
texts["jpn"]["opacity"] = GetTextLocalized("opacity", "jpn")
texts["jpn"]["pauras"] = GetTextLocalized("pauras", "jpn")
texts["jpn"]["pet"] = GetTextLocalized("pet", "jpn")
texts["jpn"]["position"] = GetTextLocalized("position", "jpn")
texts["jpn"]["powerAuras"] = GetTextLocalized("powerAuras", "jpn")
texts["jpn"]["save"] = GetTextLocalized("save", "jpn")
texts["jpn"]["search"] = GetTextLocalized("search", "jpn")
texts["jpn"]["searchwindow"] = GetTextLocalized("searchwindow", "jpn")
texts["jpn"]["settings"] = GetTextLocalized("settings", "jpn")
texts["jpn"]["show"] = GetTextLocalized("show", "jpn")
texts["jpn"]["showImage"] = GetTextLocalized("showImage", "jpn")
texts["jpn"]["showTimer"] = GetTextLocalized("showTimer", "jpn")
texts["jpn"]["showBar"] = GetTextLocalized("showBar", "jpn")
texts["jpn"]["size"] = GetTextLocalized("size", "jpn")
texts["jpn"]["solo"] = GetTextLocalized("solo", "jpn")
texts["jpn"]["spellcd"] = GetTextLocalized("spellcd", "jpn")
texts["jpn"]["stackmax"] = GetTextLocalized("stackmax", "jpn")
texts["jpn"]["stackmin"] = GetTextLocalized("stackmin", "jpn")
texts["jpn"]["stacksize"] = GetTextLocalized("stacksize", "jpn")
texts["jpn"]["targetoftarget"] = GetTextLocalized("targetoftarget", "jpn")
texts["jpn"]["useBuffImage"] = GetTextLocalized("useBuffImage", "jpn")
texts["jpn"]["while"] = GetTextLocalized("while", "jpn")
texts["jpn"]["width"] = GetTextLocalized("width", "jpn")
texts["jpn"]["withExactName"] = GetTextLocalized("withExactName", "jpn")
texts["jpn"]["x"] = GetTextLocalized("x", "jpn")
texts["jpn"]["y"] = GetTextLocalized("y", "jpn")
texts["jpn"]["you"] = GetTextLocalized("you", "jpn")
texts["jpn"]["yourtarget"] = GetTextLocalized("yourtarget", "jpn")
texts["jpn"]["condition"] = GetTextLocalized("condition", "jpn")
texts["jpn"]["extendedcondition"] = GetTextLocalized("extendedcondition", "jpn")
texts["jpn"]["view"] = GetTextLocalized("view", "jpn")
texts["jpn"]["pageof"] = GetTextLocalized("pageof", "jpn")
texts["jpn"]["page"] = GetTextLocalized("page", "jpn")
texts["jpn"]["itemcd"] = GetTextLocalized("itemcd", "jpn")
texts["jpn"]["remaining"] = GetTextLocalized("remaining", "jpn")
texts["jpn"]["elapsed"] = GetTextLocalized("elapsed", "jpn")
texts["jpn"]["milliseconds"] = GetTextLocalized("milliseconds", "jpn")
texts["jpn"]["timer"] = GetTextLocalized("timer", "jpn")
texts["jpn"]["timermax"] = GetTextLocalized("timermax", "jpn")
texts["jpn"]["timermin"] = GetTextLocalized("timermin", "jpn")
texts["jpn"]["importexportexplanation"] = GetTextLocalized("importexportexplanation", "jpn")
texts["jpn"]["code"] = GetTextLocalized("code", "jpn")
texts["jpn"]["import"] = GetTextLocalized("import", "jpn")
texts["jpn"]["export"] = GetTextLocalized("export", "jpn")
texts["jpn"]["exportimport"] = GetTextLocalized("exportimport", "jpn")

-- Initial all registered textelements
function UpdateLocalization()
  View.SearchWindow.textWidget:SetVal("label", L["searchwindow"])
  View.SearchWindow.Grid.searchLabel_text.widget:SetVal("text", L["search"])
  View.SearchWindow.Grid.SearchButton.widget:SetVal("button_label", L["search"])
  View.openConfig.widget:SetVal("button_label", L["pauras"])
  View.Settings.textWidget:SetVal("label", L["settings"])
  View.Settings.DockPanel.BottomButtons.Close.widget:SetVal("button_label", L["close"])
  View.Settings.DockPanel.BottomButtons.Save.widget:SetVal("button_label", L["save"])
  View.Settings.DockPanel.PageNavigation.Titel.widget:SetVal("of", L["pageof"])
  View.Settings.DockPanel.PageNavigation.Titel.widget:SetVal("page", L["page"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.itemNameLabel_text.widget:SetVal("text", L["name"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.hide_text.widget:SetVal("text", L["hide"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.show_text.widget:SetVal("text", L["show"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.while_text.widget:SetVal("text", L["while"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.buff_text.widget:SetVal("text", L["buff"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.debuff_text.widget:SetVal("text", L["debuff"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.spellCD_text.widget:SetVal("text", L["spellcd"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.itemCD_text.widget:SetVal("text", L["itemcd"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.withExactName_text.widget:SetVal("text", L["withExactName"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.on_text.widget:SetVal("text", L["on"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.target_text.widget:SetVal("text", L["yourtarget"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.you_text.widget:SetVal("text", L["you"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.targetOfTarget_text.widget:SetVal("text", L["targetoftarget"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.pet_text.widget:SetVal("text", L["pet"])
  View.Settings.DockPanel.PageContainer.ConditionGrid.anyUnit_text.widget:SetVal("text", L["any"])
  View.Settings.DockPanel.PageContainer.extendedConditions.moreconditions_text.widget:SetVal("text", L["moreconditions"])
  View.Settings.DockPanel.PageContainer.extendedConditions.ifGroupMemberNumber_text.widget:SetVal("text", L["ifgroupmembernumber"])
  View.Settings.DockPanel.PageContainer.extendedConditions.castedByMe_text.widget:SetVal("text", L["castedbyme"])
  View.Settings.DockPanel.PageContainer.extendedConditions.notInFight_text.widget:SetVal("text", L["notinfight"])
  View.Settings.DockPanel.PageContainer.extendedConditions.inFight_text.widget:SetVal("text", L["infight"])
  View.Settings.DockPanel.PageContainer.extendedConditions.solo_text.widget:SetVal("text", L["solo"])
  View.Settings.DockPanel.PageContainer.extendedConditions.inGroup_text.widget:SetVal("text", L["ingroup"])
  View.Settings.DockPanel.PageContainer.extendedConditions.inRaid_text.widget:SetVal("text", L["inraid"])
  View.Settings.DockPanel.PageContainer.extendedConditions.notMounted_text.widget:SetVal("text", L["notmounted"])
  View.Settings.DockPanel.PageContainer.extendedConditions.mounted_text.widget:SetVal("text", L["mounted"])
  View.Settings.DockPanel.PageContainer.extendedConditions.hostile_text.widget:SetVal("text", L["hostile"])
  View.Settings.DockPanel.PageContainer.extendedConditions.friendly_text.widget:SetVal("text", L["friendly"])
  View.Settings.DockPanel.PageContainer.extendedConditions.ifOtherVisible_text.widget:SetVal("text", L["ifothervisible"])
  View.Settings.DockPanel.PageContainer.extendedConditions.stacksize_text.widget:SetVal("text", L["stacksize"])
  View.Settings.DockPanel.PageContainer.extendedConditions.stackmin_text.widget:SetVal("text", L["stackmin"])
  View.Settings.DockPanel.PageContainer.extendedConditions.stackmax_text.widget:SetVal("text", L["stackmax"])
  View.Settings.DockPanel.PageContainer.extendedConditions.timer_text.widget:SetVal("text", L["timer"])
  View.Settings.DockPanel.PageContainer.extendedConditions.timerelapsed_text.widget:SetVal("text", L["elapsed"])
  View.Settings.DockPanel.PageContainer.extendedConditions.timerremaining_text.widget:SetVal("text", L["remaining"])
  View.Settings.DockPanel.PageContainer.extendedConditions.timermin_text.widget:SetVal("text", L["timermin"])
  View.Settings.DockPanel.PageContainer.extendedConditions.timerminms_text.widget:SetVal("text", L["milliseconds"])
  View.Settings.DockPanel.PageContainer.extendedConditions.timermax_text.widget:SetVal("text", L["timermax"])
  View.Settings.DockPanel.PageContainer.extendedConditions.timermaxms_text.widget:SetVal("text", L["milliseconds"])
  View.Settings.DockPanel.PageContainer.PositionGrid.useBuffImageLabel_text.widget:SetVal("text", L["useBuffImage"])
  View.Settings.DockPanel.PageContainer.PositionGrid.showTimerLabel_text.widget:SetVal("text", L["showTimer"])
  View.Settings.DockPanel.PageContainer.PositionGrid.showBarLabel_text.widget:SetVal("text", L["showBar"])
  View.Settings.DockPanel.PageContainer.PositionGrid.showImageLabel_text.widget:SetVal("text", L["showImage"])
  View.Settings.DockPanel.PageContainer.PositionGrid.positionLabel_text.widget:SetVal("text", L["position"])
  View.Settings.DockPanel.PageContainer.PositionGrid.positionXLabel_text.widget:SetVal("text", L["x"])
  View.Settings.DockPanel.PageContainer.PositionGrid.positionYLabel_text.widget:SetVal("text", L["y"])
  View.Settings.DockPanel.PageContainer.PositionGrid.sizeLabel_text.widget:SetVal("text", L["size"])
  View.Settings.DockPanel.PageContainer.PositionGrid.sizeXLabel_text.widget:SetVal("text", L["width"])
  View.Settings.DockPanel.PageContainer.PositionGrid.sizeYLabel_text.widget:SetVal("text", L["height"])
  View.Settings.DockPanel.PageContainer.PositionGrid.opacityLabel_text.widget:SetVal("text", L["opacity"])
  View.Settings.DockPanel.PageContainer.PositionGrid.OpacityDecrease.widget:SetVal("button_label", L["decreaseSymbol"])
  View.Settings.DockPanel.PageContainer.PositionGrid.OpacityIncrease.widget:SetVal("button_label", L["increaseSymbol"])
  View.Settings.DockPanel.PageContainer.ImportExportGrid.explanationLabel_text.widget:SetVal("text", L["importexportexplanation"])
  View.Settings.DockPanel.PageContainer.ImportExportGrid.codeLabel_text.widget:SetVal("text", L["code"])
  View.Settings.DockPanel.PageContainer.ImportExportGrid.importButton.widget:SetVal("button_label", L["import"])
  View.Settings.DockPanel.PageContainer.ImportExportGrid.exportButton.widget:SetVal("button_label", L["export"])
  View.AurasWindow.textWidget:SetVal("label", L["powerAuras"])
  View.AurasWindow.AuraLine.Delete.widget:SetVal("button_label", L["delete"])
  View.AurasWindow.AuraLine.Edit.widget:SetVal("button_label", L["edit"])
  View.AurasWindow.DockPanel.ButtomButtons.Add.widget:SetVal("button_label", L["new"])
end
-- Set L to English, because in AO 2.0.03 was the GetGameLocalization broken
-- and L was nil. I used the second timer and every second occur an error.
L = texts["eng"]
-- Set current GameLocalization to L
CallWhenCharacterAvailable(function()
  L = texts[GetGameLocalization()] or L
  UpdateLocalization()
end)

