cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piroumian, Konstantin" <KPiroum...@flagship.ru>
Subject Re: future plans?
Date Tue, 31 Jul 2001 07:51:38 GMT
Hi!

> Hi,
> does anybody knows if i18n will be extended in the future
> or has some undocumented features?

Currently, I am busy with my work project and don't have much time for
i18nTransformer. It's open source and you are free to extend it. I hope to
be a little more free in a week or two then I can do it myself.

> I have some needs and I wonder that I'm the first one (?)
> who think and ask about this:

No, I thought of all this features when I was implementing the transformer,
but it seems that not many people is interested in it and you are the first
or the second one who asked about new features.

> 1) I need more control over <i18n:date/> e.g. I need a parameter
>    to specify DateFormat.SHORT, MEDIUM, LONG or FULL.

Ok.

> 2) I would like to have more control over date and time: Make it
>    separate, for instance as date the actual date
>    but the time hard wired.
>    So it should give a parameter for selecting analog to java:
>    getDateInstance(), getTimeInstance() or getDateTimeInstance()

Yes, a pair of tags can be added for that:

<i18n:datetime />
<i18n:time />

> 2) In the same page I need more than one currency.
>    I think about a parameter to specify a different then the default
>    locale.

Yes, I thought of this too. I think that every i18n element must have a
possibility to specify its own locale:

<i18n:text locale="ru" />
<i18n:currency locale="en_US" />

> I know that I can do this inside a xsp but ...

You can do it also in XSLT and in some cases it would be better. E.g. for
currency format you can use  <xsl:decimal-format name="us"
decimal-separator="." grouping-separator=","/> declaratation, then use it
like this:

<xsl:value-of select="format-number(price, '$#,##0.00', 'us')"/>

The problem with i18n tranformer is that you cannot use objects as
arguments. This is not possible now with a transformer:

<i18n:currency value="java:new Date()" /> or <i18n:currency
value="java:dateVariable" />

Anyway, thank you for your suggestions and feel free to contact me for any
questions about i18n transformer.

P.S. Marcus Crafter <crafterm@fztig938.bank.dresdner.net> is now working on
the i18n transformer, i18n dictionaries and locale selection, so I think
that you can ask him about this too.

>
> Regards,
> Michael
>

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

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message