aspose file tools*
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
JavaRanch » Java Forums » Java » JSF
Bookmark "Convention for keys in message bundles" Watch "Convention for keys in message bundles" New topic
Author

Convention for keys in message bundles

Jiri Pejchal
Greenhorn

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:
package.filename.formquestion=

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: 1844

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
Spring Tutorials, OCAJP Mock Questions, 400+ OCPJP Mock Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Convention for keys in message bundles