View Single Post
04/29/15, 12:47 PM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 578
Originally Posted by hisdad View Post
Hi
I wa quite surprised to find that the non english game will return strings quite differently for example in German.
GetUnitClass("player") is "Zauberin^f" for a female sorc and "Zauberer^m" for a male sorc.

We can probably guess that the ^ is a marker

But race returns "Ork^m||Orks^p" yes we get both.

Then it gets weird.

Alliance returns "Ebenherz-Pakt^md",
Map --GetMapName() -- Shadowfen becomes "Sturmfeste^N,in"

Can anyone suggest a better normalisation than just deleting everything to the right of the ^?

Regards,
-Dad

PS: dates in string format are different as well.
Yes, date format is different in all three supported languages

Use the ZO_FormatTime functions from WIKI
and look at: http://www.esoui.com/forums/showthread.php?t=1443
Basically ALL names returned from API must be processed with zo_strformat.
Including zones names.
  Reply With Quote