View Single Post
08/16/15, 02:22 AM   #20
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
There is another use of ZO_CreateStringId and SafeAddString:
In your manifest file you could do:
...
lang\strings.lua
lang\$(language).lua
...


in strings.lua you define the id with default text (english)
ZO_CreateStringId("SI_ADDONNAME_TEXT1", "what ever")
...

and in the other files you do, e.g. de.lua:
SafeAddString(SI_ADDONNAME_TEXT1, "was auch immer")
...

This way strings default to english if:
1. The language is not translated at all. (language file missing)
2. You have new, yet not translated, strings.
  Reply With Quote