This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JSF and the fly likes Convention for keys in message bundles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Convention for keys in message bundles" Watch "Convention for keys in message bundles" New topic

Convention for keys in message bundles

Jiri Pejchal

Joined: Jan 21, 2008
Posts: 1
Hi,I'm making a localized web application with JSF. Are there any conventions (recommendations)for naming the keys in messages bundles?

I mean something like:

Maybe the package name is superfluous (and too long) and should be omitted.

What about grouping messages?
There are also same messages in different files:
some of them could be shared but others may mean something different
depending on the context.
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1850

I am working on JSF for the past one year. I don't thing there is a naming convention for the messages. We cann't use .(dot) because it will consider it as an object. I too had the same problem of finding the good convention for messages used in JSF. :p

Krishna Srinivasan
OCAJP 7/8 Exam, 400+ OCPJP Mock Questions
I agree. Here's the link:
subject: Convention for keys in message bundles
jQuery in Action, 3rd edition