If I have a Resource bundle property file:
A.properties: thekey={0} This is a test
And then I have java code that loads the resource bundle:
ResourceBundle labels =
ResourceBundle.getBundle("A", currentLocale);
labels.getString("thekey");
How can I replace the {0} text with some value
labels.getString("thekey", "Yes!!!");
Such that the output comes out as:
Yes!!! This is a test.
There are no methods that are part of Resource Bundle to do this. Also, I am in Struts, is there some way to use MessageProperties to do the replacement.