Reputation: 23443
Can i do something like in JSF Resource Bundle property text file:
receptionContact=Reception
reservationContact=Reservation
receptionEmail={receptionContact}
reservationEmail={reservationContact}
Upvotes: 1
Views: 1652
Reputation: 8498
You can parameterize your resource bundles, but no reflective reuse of values by keys. Please have a look on this: https://code.google.com/p/reflectiveresourcebundle/
With that, you don't have repeat your self!
Without:
company.service.phone=555-1212
[email protected]
my.error.message=Problem accessing account!\
Please call customer service at 555-1212 \
or email us at [email protected]
With:
company.service.phone=555-1212
[email protected]
my.error.message=Problem accessing account!\
Please call customer service at ${company.service.phone} \
or email us at ${company.service.email}
Here is another interesting tutorial about formatting.
Upvotes: 2