View Single Post
01-03-23, 11:48 PM   #3
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
Hi Dridzt,

thanks so much for your reply and suggestion.

I imagined it was related to a multibyte problem but didnt know how to solve
Now I know it could be done with this library.

But because I am not so sure that the first char I get from a multibyte locale string means what I want I have adopted a mixed approach solution

For single byte locale string I use the normal string.sub , for multiibyte I prefer to provide (if any) a preset string in localization.lua.

Lua Code:
  1. fort1 = string.sub(C_ChallengeMode.GetAffixInfo(10),1,1)
  2. tyra1 = string.sub(C_ChallengeMode.GetAffixInfo(9),1,1)
  3. if GetLocale() == "zhTW" then
  4.    fort1 = L["F"]
  5.    tyra1 = L["T"]
  6. end
  7. ... bla bla

Btw thanks so much for your kind reply.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote