<% // these will be used in formatting the message for test2 java.util.Date dateArg = new java.util.Date(); java.lang.Float numberArg = new java.lang.Float("123.45"); %> The current locale is <%= pageContext.getResponse().getLocale() %>. Items show in italics are localized.
The message tag with no body displays the value provided for the provided key in the bundle named by the localize tag.
<i18n:message key="test1"/>

The message tag with nested messageArg tags make use of the java.text.MessageFormat class.
  <i18n:message key="test2">
    <i18n:messageArg value="<%= dateArg %>"/>
    <i18n:messageArg value="<%= numberArg %>"/>
  </i18n:message>
  

The message tag with a defined body provides a default in case a particular locale doesn't have the key defined. This is also useful to
  <i18n:message key="no.such.key">
     This text would be displayed if a language neglected to
     define a value for no.such.key.  Arguments are supported {0,date,short}
    <i18n:messageArg value="<%= dateArg %>"/>
  </i18n:message>
  
This text would be displayed if a language neglected to define a value for no.such.key. Arguments are supported {0,date,short}