OK, found the answer in this link.
Appearently, you can do something like this in resources:
root: {
personalHello: 'Hello ${a1}'
}
And then call it like this from the code:
somDiv.innerHTML = dojo.string.substitute(i18n.personalHello, {a1: 'David'};
In Dojo >= 1.7 (AMD):
require(["dojo/string"], function(string) {
somDiv.innerHTML = string.substitute(i18n.personalHello, {a1: 'David'};
})
Checked it. It works!