Lots of way to go about localisation but probably for something small like this the easiest would be something like:
Lua Code:
local Localizations = {
enUS = {
Waiting = "Next event is in: %s",
Running = "%s until event ends",
},
zhCN = {
Waiting = "下一个活动在: %s",
Running = "%s 直到事件结束",
},
deDE = {
Waiting = "Nächste Veranstaltung ist in: %s",
Running = "bis zum Ende der Veranstaltung: %s",
},
}
local locale = GetLocale()
local L = Localizations[locale] or Localizations.enUS -- Default to enUS if locale doesn't exist in the table
Then you can replace
"Next event is in: %s" with
L.Waiting and
"%s until event ends" with
L.Running
The usual scoping rules apply.
Your example didn't have a
%s for the German "Until the event ends" so I just stuck one at the end (my German foo is also broken
).