Lua Code:
pattern = "I have sold <<1>> <<1[items/item/items]>>."
msg = zo_strformat(pattern, num)
If num = 0
<<1>> is replaced by num and <<1[
items/item/items]>> returns first from
msg = "I have sold 0 items"
if num = 1
<<1>> is replaced by num and <<1[items/
item/items]>> returns second from
msg = "I have sold 1 item"
if num > 1
<<1>> is replaced by num (eg 5) and <<1[items/item/
items]>> returns third from
msg = "I have sold 5 items"