WoW-Pro Guides

WoW-Pro Guides

3M Downloads

Class/Race localization

silvann opened this issue · 1 comments

commented

Submitted by Shakazahn on Fri, 2010-11-26 16:13. (via WoWPro)

Ok, yesterday I've set my client back to german and tried to level a Troll Hunter using
the 01_05_Bitsem_Echo_Isles guide.

The first quests don't show up in the guide because all of the entries wear a |C| tag,
which is ok, but the english class names don't match my german ones.

So I replaced the "|C|Hunter|" entries with "|C|Hunter, Jäger|" which didn't work either.
Then I removed the english classnames, but "Jäger" again wasn't found by
"class:find(myclass)".
"Jäger" is what UnitClass("player") returns for "Hunter" on a german client.

Ok, at that point I set back my client to english and removed my changes.
A few minutes ago I went through the WoW-Api and found some interesting details for the
UnitClass and UnitRace methods:

both of them return a second value

e.g.:
race, raceEN = UnitRace("player")
and
class, classEN = UnitClass("player")

the first value contains the localized race/class
and the second value always contains the english race/class

Look at
http://www.wowwiki.com/API_UnitRace
http://www.wowwiki.com/API_UnitClass

for more details, because UnitRace returns "Undead" for the 1st value and "Scourge" for the 2nd value. ô_0
And for UnitClass the second value contains the CAPITALIZED class names ("MAGE", "WARRIOR",...).
But this can be "fixed" by using strtolower functions in the AddOn.

btw.
The displayed Questobjectives are autotranslated when I'm using the german client.
This is because you use the QuestLogLeaderBoard methods/values in the AddOn I guess.

commented

Marking this as resolved, with the Shakazahn changes.