View Single Post
08/15/15, 08:08 PM   #17
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
Question

@circonian now I see that my example was bad.

Say you use $(language) to include the correct file, and in each locale file you put something simpler, like:

Code:
-- EN.lua
STRING_JEWELRY = "Jewelry"
Code:
-- DE.lua
STRING_JEWELRY = "Schmuch"
Then in your add-on you simply use:

Code:
-- ...
STRING_JEWELRY
Is it worse than the ZO standard of using CreateString and GetString ? And why ?

Thanks

Edit. I ask because the concept I illustrated above is clear enough and seems to work pretty well: you use the same variable name but load different files and bingo it all works. But maybe the localization API provided (GetString, etc.) has more implications than what meets the eye.

Last edited by haggen : 08/15/15 at 08:13 PM.
  Reply With Quote