|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@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).
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 |
---|
public abstract java.lang.String value
locale()
.
This is the value that is stored in the resource bundle properties file (on the right side of the equals sign).
public abstract java.lang.String locale
message text
. If this is not specified, the I18NResourceBundle.defaultLocale()
for the resource bundle annotation in scope is used.
public abstract java.lang.String help
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |