View Single Post
02-23-16, 10:36 AM   #34
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
If you set up default text strings with your messages, either stand-alone or in a table, then when the game loads you can then detect the localisation and overwrite the variables with the locale specific messages.
Code:
local MyMessages = {
    Winning = "WINNING!!!",
    Losing = "LOSING!!!!",
}

if GetLocale() == "deDE" then
    MyMessages = {
        Winning = "GEREINNT!!!",
        Losing = "VERLIENREN!!!!",
    }
end
-- Pardon my german, it is coutesy of google tranlate.

Everywhere xx:SetText(MyMessages.Winning)
You will get the current locale message.

There may well be other, better ways.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 02-23-16 at 10:38 AM.
  Reply With Quote