A simple way is to pass them as strings:
msg.format("year.of.birth", name, String.valueOf(2008));
An alternative is to specify the format of the number in the message resource (but I would only do this if the format may vary depending on the locales):
year.of.birth={0} was born in {1,number,
Thilo
source share