| Author |
resource bundle properties file referencing key from value
|
kumar chandrakar
Greenhorn
Joined: Dec 23, 2008
Posts: 3
|
|
I have say message.properties as follows label.productName = MyProduct label.companyName = MyCompany label.header = MyCompany-MyProduct label.title = MyCompany-MyProduct label.footer = MyCompany 2005-2008 All rights reserved As you can see I have same words repeated in most of the labels. Is there any way to avoid it by using keys "label.productName" and "label.companyName" with other values like.. label.productName = MyProduct label.companyName = MyCompany label.header = {label.productName}-{label.companyName} label.title = {label.productName}-{label.companyName} label.footer = {label.companyName} 2005-2008 All rights reserved Can resource bundle recognize it if my values contain/references other keys defined in same properties file.
|
 |
Alexey Saenko
Greenhorn
Joined: Aug 18, 2008
Posts: 25
|
|
Hi Kumar, As far as I know, you cannot use for defining entries in property file other entries from the same file. But you can generate all values you need in your code, it looks like such solution is not difficult ;-)
|
SCJP 6, SCBCD 5, OCEWSD 6
My blog: http://darkleden.wordpress.com
|
 |
 |
|
|
subject: resource bundle properties file referencing key from value
|
|
|