Package org.nuiton.i18n.format
Interface I18nMessageFormatter
- All Known Implementing Classes:
MessageFormatI18nMessageFormatter,StringFormatI18nMessageFormatter
public interface I18nMessageFormatter
Contract to format a i18n message.
Created: 05/05/11
- Since:
- 2.4
- Author:
- Florian Desbois, Tony Chemit - chemit@codelutin.com
- See Also:
StringFormatI18nMessageFormatter,MessageFormatI18nMessageFormatter
-
Method Summary
Modifier and Type Method Description java.lang.Stringformat(java.util.Locale locale, java.lang.String message, java.lang.Object... args)Format a givenmessagewithlocaleand optinalargs.
-
Method Details
-
format
java.lang.String format(java.util.Locale locale, java.lang.String message, java.lang.Object... args)Format a givenmessagewithlocaleand optinalargs. The main purpose is to replace placeholders inmessagewithargsvalue. This may depend onlocalefor date purpose for example.- Parameters:
locale- locale to use for formatting (number, date, ...)message- message to format (that contains placeholders)args- object array to use in formatting the message- Returns:
- the formatted message
-