Thread: AceDB Resetting
View Single Post
08-08-16, 08:44 AM   #12
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
You can also look at Blizzard's globalstrings.lua to see if there is any words or phrases they have already translated. For example, do a search for "general options" and look what you find.

Replace all instances of L["General"] with COMPACT_UNIT_FRAME_PROFILE_SUBTYPE_ALL as one example.

Also, in your localization file for enUS.lua, delete if not L then return; end –– afterall, this is your default localization. If someone playing on deDE loaded your AddOn, absolutely zero text would be displayed except of any globalstrings. The beginning of enUS.lua should look like this.
Code:
local AddOnName, Engine = ...;
local L = LibStub("AceLocale-3.0"):NewLocale(AddonName, "enUS", true, false)

L['Text'] = true
-- etc
Speaking of localization, change this line in core.lua
Code:
local L = LibStub("AceLocale-3.0"):GetLocale(AddOnName, false)

-- should be thusly
local L = LibStub("AceLocale-3.0"):GetLocale(AddOnName, true)
  Reply With Quote