/** * Formats the message stored in the resource bundle (using a MessageFormat). * * @param key the resourcebundle key * @param parameters the parameter collection for the message * @return the formated string */ public String formatMessage( final String key, final Object[] parameters ) { final MessageFormat format = new MessageFormat( strictString( key ) ); format.setLocale( getLocale() ); return format.format( parameters ); }
/** * Formats the message stored in the resource bundle (using a * MessageFormat). * * @param key the resourcebundle key * @param parameters the parameter collection for the message * @return the formated string */ public String formatMessage(final String key, final Object[] parameters) { final MessageFormat format = new MessageFormat(strictString(key)); format.setLocale(getLocale()); return format.format(parameters); }