Return-Path: Delivered-To: apmail-jakarta-velocity-user-archive@jakarta.apache.org Received: (qmail 53277 invoked by uid 500); 6 May 2001 14:27:16 -0000 Mailing-List: contact velocity-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: velocity-user@jakarta.apache.org Delivered-To: mailing list velocity-user@jakarta.apache.org Received: (qmail 53268 invoked from network); 6 May 2001 14:27:15 -0000 Date: Sun, 6 May 2001 10:27:50 -0400 (EDT) From: bob mcwhirter X-Sender: bob@exeter.exeter.org To: velocity-user@jakarta.apache.org Subject: Re: Resource Bundle in Velocity In-Reply-To: <200105061323.PAA20243@zeus.records.intra> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N > Hello, > > >>>$$bundle.getString("key") > > >>>to get a string, and put the right bundle into the context for the > >>>required locale of the client. > > That does work but what actually doesn't work is: > > $MessageFormat.format($bundle.getString("key"), new Object[] {"name"} ) > > This has to be done since my properties files contain something like > Welcome {0} or Willkommen {0} based on the locale. > > Will it be a good idea to add some sort of API to Velocity for doing > this? I *know* that this is something I'm going to have to deal with at work. I'm betting that hopefully we don't have to actually extend Velocity proper, and do it all with helper objects in the context. If you have implementation ideas, I'd love to hear'em. Else, we'll probably also develop an implementation, and at some point, donate it back to the project. -bob