com.liferay.faces.util.i18n
Interface I18n

All Known Implementing Classes:
I18nBundleBase, I18nWrapper

public interface I18n

This interface defines a contract for obtaining internationalized messages of type String or FacesMessage.

Author:
Neil Griffin

Method Summary
 javax.faces.application.FacesMessage getFacesMessage(javax.faces.context.FacesContext facesContext, Locale locale, javax.faces.application.FacesMessage.Severity severity, String messageId)
          Creates (if necessary) and returns an internationalized FacesMessage based on the specified locale, severity, and messageId.
 javax.faces.application.FacesMessage getFacesMessage(javax.faces.context.FacesContext facesContext, Locale locale, javax.faces.application.FacesMessage.Severity severity, String messageId, Object... arguments)
          Creates (if necessary) and returns an internationalized FacesMessage based on the specified locale, severity, and messageId.
 String getMessage(javax.faces.context.FacesContext facesContext, Locale locale, String messageId)
          Creates (if necessary) and returns an internationalized String message based on the specified locale and messageId.
 String getMessage(javax.faces.context.FacesContext facesContext, Locale locale, String messageId, Object... arguments)
          Creates (if necessary) and returns an internationalized String message based on the specified locale, messageId.
 

Method Detail

getFacesMessage

javax.faces.application.FacesMessage getFacesMessage(javax.faces.context.FacesContext facesContext,
                                                     Locale locale,
                                                     javax.faces.application.FacesMessage.Severity severity,
                                                     String messageId)
Creates (if necessary) and returns an internationalized FacesMessage based on the specified locale, severity, and messageId.

Parameters:
facesContext - The current faces context.
locale - The locale of the message.
severity - The severity of the message.
messageId - The id of the message.

getFacesMessage

javax.faces.application.FacesMessage getFacesMessage(javax.faces.context.FacesContext facesContext,
                                                     Locale locale,
                                                     javax.faces.application.FacesMessage.Severity severity,
                                                     String messageId,
                                                     Object... arguments)
Creates (if necessary) and returns an internationalized FacesMessage based on the specified locale, severity, and messageId. If the message contains a MessageFormat pattern then the specified arguments are inserted into the message accordingly.

Parameters:
facesContext - The current faces context.
locale - The locale of the message.
severity - The severity of the message.
messageId - The id of the message.
arguments - The values that are to be inserted according to the MessageFormat pattern.

getMessage

String getMessage(javax.faces.context.FacesContext facesContext,
                  Locale locale,
                  String messageId)
Creates (if necessary) and returns an internationalized String message based on the specified locale and messageId.

Parameters:
facesContext - The current faces context.
locale - The locale of the message.
messageId - The id of the message.

getMessage

String getMessage(javax.faces.context.FacesContext facesContext,
                  Locale locale,
                  String messageId,
                  Object... arguments)
Creates (if necessary) and returns an internationalized String message based on the specified locale, messageId. If the message contains a MessageFormat pattern then the specified arguments are inserted into the message accordingly.

Parameters:
facesContext - The current faces context.
locale - The locale of the message.
messageId - The id of the message.
arguments - The values that are to be inserted according to the MessageFormat pattern.


Copyright © 2019 Liferay, Inc.. All rights reserved.