Thread Tools Display Modes
04/29/15, 12:34 PM   #1
hisdad
AddOn Author - Click to view addons
Join Date: Dec 2014
Posts: 33
Advice on Genderised strings

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() -- Stormhold- 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.

Last edited by hisdad : 04/29/15 at 12:52 PM.
  Reply With Quote
04/29/15, 12:47 PM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
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
04/29/15, 01:01 PM   #3
hisdad
AddOn Author - Click to view addons
Join Date: Dec 2014
Posts: 33
Originally Posted by votan View Post
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.
Can't use ZO_Format_Time as im going from String -> Timestamp
but that thread is just perfect!

That needs to go in the wiki!

Thanks V Much!

--Dad
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Advice on Genderised strings


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off