mazz.i18n.annotation
Annotation Type I18NMessage


@Documented
@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface I18NMessage

Annotates a field as an I18N resource bundle message key. You define the locale the message is in and that message's text value translated in the locale. If a locale is not specified, it will be in the default locale specified in its resource bundle. All fields annotated with this annotation must be within a scope of a resource bundle - if one is not defined, a default resource bundle definition should be assumed by the annotation processor (e.g. an appropriate default resource bundle definition would be a default base bundle name of "messages" with a default locale being the VM default locale). You can annotate the same field with multiple I18NMessage annotations via I18NMessages if you want to define multiple translations for a single message key.

The additional "help" attribute can be used when generating help documentation - it is a string that can further describe the message or explain under the conditions by which this message appears and may also include things, as an example, like correction procedures (if the message is an error message).

Author:
John Mazzitelli

Required Element Summary
 java.lang.String value
          The actual message text in the annotation's locale().
 
Optional Element Summary
 java.lang.String help
          An optional help string that can further describe this message - it can explain under what conditions this message will appear and (if this message is an error message) can include correction procedures that can be followed to fix the error.
 java.lang.String locale
          The locale of the message text.
 

Element Detail

value

public abstract java.lang.String value
The actual message text in the annotation's locale(). This is the value that is stored in the resource bundle properties file (on the right side of the equals sign).

Returns:
the message text

locale

public abstract java.lang.String locale
The locale of the message text. If this is not specified, the I18NResourceBundle.defaultLocale() for the resource bundle annotation in scope is used.

Returns:
the message locale
Default:
""

help

public abstract java.lang.String help
An optional help string that can further describe this message - it can explain under what conditions this message will appear and (if this message is an error message) can include correction procedures that can be followed to fix the error. This attribute is merely for informational purposes only and is generally only used when generating help documentation.

Returns:
a help description that further explains the meaning of this message
Default:
""


Copyright © 2006 John J. Mazzitelli All Rights Reserved. Licensed under LGPL