TM modificator don't work? to_char

Started by Pavel Stehuleover 19 years ago7 messages
#1Pavel Stehule
pavel.stehule@hotmail.com

Hello,

I try 8.2 features. I tested to_char from doc, but without success.

postgres=# select to_char(now(), 'TMDay, DD TMMonth YYYY');
to_char
-----------------------------
Thursday, 28 September 2006
(1 row)

I expected translated names :-(. What can be wrong.

lc_collate | cs_CZ.UTF-8 |
Shows the collation order locale.
lc_ctype | cs_CZ.UTF-8 |
Shows the character classification and case conversion locale.
lc_messages | cs_CZ.UTF-8 |
Sets the language in which messages are displayed.
lc_monetary | cs_CZ.UTF-8 |
Sets the locale for formatting monetary amounts.
lc_numeric | cs_CZ.UTF-8 |
Sets the locale for formatting numbers.
lc_time | cs_CZ.UTF-8

Regards

Pavel Stehule

_________________________________________________________________
Chcete sdilet sve obrazky a hudbu s prateli? http://messenger.msn.cz/

#2Bruce Momjian
bruce@momjian.us
In reply to: Pavel Stehule (#1)
Re: TM modificator don't work? to_char

Can someone confirm this features works or fails?

---------------------------------------------------------------------------

Pavel Stehule wrote:

Hello,

I try 8.2 features. I tested to_char from doc, but without success.

postgres=# select to_char(now(), 'TMDay, DD TMMonth YYYY');
to_char
-----------------------------
Thursday, 28 September 2006
(1 row)

I expected translated names :-(. What can be wrong.

lc_collate | cs_CZ.UTF-8 |
Shows the collation order locale.
lc_ctype | cs_CZ.UTF-8 |
Shows the character classification and case conversion locale.
lc_messages | cs_CZ.UTF-8 |
Sets the language in which messages are displayed.
lc_monetary | cs_CZ.UTF-8 |
Sets the locale for formatting monetary amounts.
lc_numeric | cs_CZ.UTF-8 |
Sets the locale for formatting numbers.
lc_time | cs_CZ.UTF-8

Regards

Pavel Stehule

_________________________________________________________________
Chcete sdilet sve obrazky a hudbu s prateli? http://messenger.msn.cz/

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#3Sergey E. Koposov
math@sai.msu.ru
In reply to: Bruce Momjian (#2)
Re: TM modificator don't work? to_char

On Mon, 2 Oct 2006, Bruce Momjian wrote:

Can someone confirm this features works or fails?

As I see from the original commit:
http://groups.google.com/group/pgsql.committers/browse_frm/thread/4ba64c906fca7211/0e3b4d495ec7ecf8?lnk=gst&q=to_char&rnum=8#0e3b4d495ec7ecf8
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/formatting.c.diff?r1=1.103&r2=1.104

the patch for to_char wasn't written at all for looking into the locale
settings... It "uses" gettext() to "localize" the output of to_char()
which seems to be pretty useless behaviour...

Regards,
Sergey
*******************************************************************
Sergey E. Koposov
Max Planck Institute for Astronomy/Sternberg Astronomical Institute
Tel: +49-6221-528-349
Web: http://lnfm1.sai.msu.ru/~math
E-mail: math@sai.msu.ru

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#2)
Re: TM modificator don't work? to_char

Bruce Momjian <bruce@momjian.us> writes:

Can someone confirm this features works or fails?

It works if you have NLS translations for "Thursday", "September",
etc ... which none of the backend .po files do yet.

regards, tom lane

#5Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#4)
Re: TM modificator don't work? to_char

Tom Lane wrote:

Bruce Momjian <bruce@momjian.us> writes:

Can someone confirm this features works or fails?

It works if you have NLS translations for "Thursday", "September",
etc ... which none of the backend .po files do yet.

But they will when we have the po files updated for this release, I
suppose.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#5)
Re: TM modificator don't work? to_char

Bruce Momjian <bruce@momjian.us> writes:

Tom Lane wrote:

It works if you have NLS translations for "Thursday", "September",
etc ... which none of the backend .po files do yet.

But they will when we have the po files updated for this release, I
suppose.

We should probably list translation updates as one of the open items
for the release.

regards, tom lane

#7Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#6)
Re: TM modificator don't work? to_char

Tom Lane wrote:

Bruce Momjian <bruce@momjian.us> writes:

Tom Lane wrote:

It works if you have NLS translations for "Thursday", "September",
etc ... which none of the backend .po files do yet.

But they will when we have the po files updated for this release, I
suppose.

We should probably list translation updates as one of the open items
for the release.

Added.

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +