You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marcin Okraszewski <ok...@o2.pl> on 2003/11/03 20:16:40 UTC

i18n: how to override locale date format?

Hi,
I'm using i18n for localizing date format. It works fine, but I
don't agree with format for Polish date (yyyy-MM-dd and should
rather be dd.MM.yyyy). How can I change it? 

Regards,
Marcin Okraszewski

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


Re: i18n: how to override locale date format?

Posted by Marcin Okraszewski <ok...@o2.pl>.
> It uses DateFormat.getDateInstance(style, locale). How Java handles the 
> locale don't know, but it hadles it correctly: According to Polish rules 
> it should be (and IS) yyyy-MM-dd.

Well, I don't agree, that Polish date _should_ be yyyy-MM-dd. Try to 
look in Polish dictioaries. I've checked PWN and they say that the right 
way of writting date is dd.MM.yyyy. Check fallowing address:

http://slowniki.pwn.pl/poradnia/lista.php?szukaj=daty&kat=18

The problem was metioned sevral times and the answer was always the same.

Here is quotation (in Polish unfortunately) from ortography dictionary:

„Wyjąwszy szczególne wypadki, takie jak wymogi komputerowego 
przetwarzania danych lub zasady urzędowe i prawne, nie należy stosować 
innych znaków do oddzielania poszczególnych składników daty (np. 
dywizów: 1-1-1995) ani też stosować innego szyku niż: dzień, miesiąc, 
rok” – czytamy w Wielkim słowniku ortograficznym PWN, s. 121.

-- 
-------------------------------------------------------------
                       Marcin Okraszewski
okrasz@o2.pl                                       GG: 341942
okrasz@vlo.ids.gda.pl          PGP: www.okrasz.prv.pl/pgp.asc
-------------------------------------------------------------




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


Re: i18n: how to override locale date format?

Posted by Tomasz Bech <tb...@polbox.com>.
It uses DateFormat.getDateInstance(style, locale). How Java handles the 
locale don't know, but it hadles it correctly: According to Polish rules 
it should be (and IS) yyyy-MM-dd.



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


Re: how to override locale date format?

Posted by Konstantin Piroumian <kp...@apache.org>.
Date formats used by i18n transformer come from the JDK resource bundles.
Check the i18n samples in Cocoon and switch to Polish translation, there is
a date somewhere at the last line and it should be formatted according to
the selected locale.

In any case, if you want another format then you can use
<i18n:date format="dd.MM.yyyy" .../> to specify the desired date format. But
note that this format will be fixed for all the locales.

Regards,
  Konstantin

From: "Marcin Okraszewski" <ok...@o2.pl>

> Hi,
> I'm using i18n for localizing date format. It works fine, but I
> don't agree with format for Polish date (yyyy-MM-dd and should
> rather be dd.MM.yyyy). How can I change it?
>
> Regards,
> Marcin Okraszewski
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


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