One choice is to provide your own message binding by contribute a binding source in your AppModule.java like below. You could use any formatter you want in there. --- public void contributeBindingSource( MappedConfiguration<String, BindingFactory> configuration ) { configuration.add( "mymsg", new MyMessageBindingFactoryImpl() ); } ---
Cheers, Jeffrey Ai Doug Hauge wrote: > > Is there some reason Tapestry chose to use 'java.util.Formatter' style > formatting as opposed to 'java.text.MessageFormat' style? The latter > seems preferable for localization, primarily because it has the 'choice' > format type. We would like to use the 'java.text.MessageFormat' style > for our application, and are considering providing our own > implementation of the 'MessageFormatter' service, but the question > becomes how to use this formatting for only our messages. We have > considered decorating the 'ComponentMessagesSource' service, but this > would then apply to all component messages, including those for core > components, which have some text properties that use > 'java.util.Formatter' style formatting. We could override these messages > as described in > http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMes > sageBanner, but that seems a bit brittle. > > Does anyone else have any need to use 'java.text.MessageFormat' style > formatting, or are we the only ones? Do the solutions mentioned above > sound reasonable? > > Thanks, > Doug > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/T5%3A-Tapestry-message-localization%2C-java.util.Formatter-vs.-java.text.MessageFormat-tf4287513.html#a14154551 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]