View Single Post
09/12/14, 08:28 AM   #6
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by niocwy View Post
That's I was starting to think too. Thanks for clearing this up.

So what you're telling me is that the GetUnitBuffInfo() will always return the english name of the buff (even on a french and german client) ?

I would gladly test this myself but my internet connection is slow as hell and I didn't finish dowloading the french files yet.
No, function will return localized names. However you don't need to download french or german client to test it out. Just switch client language using the SetCVar("language.2", "fr") or SetCVar("language.2", "de") function (it will reload UI in the selected language). I have defined the following slash commands in my private addon so I can test another languages:

Lua Code:
  1. SLASH_COMMANDS["/langen"] = function() SetCVar("language.2", "en") end
  2. SLASH_COMMANDS["/langde"] = function() SetCVar("language.2", "de") end
  3. SLASH_COMMANDS["/langfr"] = function() SetCVar("language.2", "fr") end

If you don't want to define your own slash commands, just use /script:
Code:
/script SetCVar("language.2", "fr")
  Reply With Quote