Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 28090 invoked by uid 500); 14 May 2001 09:10:33 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 27979 invoked from network); 14 May 2001 09:10:26 -0000 From: "Piroumian, Konstantin" To: cocoon-dev@xml.apache.org Message-ID: <041c01c0dc55$b6406be0$9d0a000a@flagship.ru> References: Subject: Re: I18nTransformer (with param substitution) Date: Mon, 14 May 2001 13:10:25 +0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N > > Konstantin > > Can anybody work on this patch? I haven't had the time to look into it. What do you mean by working on it? I am still working on it - it is required for my current project, but it's open source and anybody is allowed to work on it and improve. > > Giacomo > > > Hi! > > > > I've implemented the param substitution in I18nTransformer. Now it is > > possible to use it like this: > > > > This page was hit {0} times.{/i18n:text> > > count > > > > The source and samples are attached. I have also attached an XML Spy project > > file for convenience. > > > > I am open for comments and suggestions. Next task will be dictionary > > improvement to support include and import capabilities. > > > > Btw, is there a good way of internationalizing dates and currencies (to use > > different formatting)? > > Example: > > > > Current date {0, date, 'dd/MM/yyy'}.{/i18n:text> > > new Date() > > > > > > The problem is that MessageFormat class that I use for substitution gets an > > array of Objects as argument, but I cannot get objects from XML - only > > strings. Any ideas? > > > > Best regards, > > > > Konstantin Piroumian > > Software engineer > > > > Protek Flagship LLC > > Phone: + 7 095 795 0520 (add. 1288) > > Fax: + 7 095 795 0525 > > E-mail: kpiroumian@flagship.ru > > http://www.protek.com --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org