File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring 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
Don't get me started about those stupid light bulbs.
subject: Convention for keys in message bundles
It's not a secret anymore!