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.
|