I've been playing with mesage catalog, I want to make an implementation that will load translations from database, and also creating components to allow adding translations while application is working (this made my life easier on projects where users, made translations on the fly while testing the app).
... ... however, relevant to your question, I've looked at the source, tapestry has it's own interface for formatter, so you can - decorate the service. - provide your own formatters, - look for escape chars to decide which formatter to use, - delegate to default impl where possible this way both implementations can live side by side. Davor Hrg On Aug 17, 2007 7:53 PM, Doug Hauge <[EMAIL PROTECTED]> 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] > >