Re: NLS: use gettext() to translate system error messages - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: NLS: use gettext() to translate system error messages
Date
Msg-id b2437530dd2df9b4f33a3bd000223bc592e11fae.camel@j-davis.com
Whole thread Raw
In response to Re: NLS: use gettext() to translate system error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, 2025-12-23 at 15:07 -0500, Tom Lane wrote:
> This surprises me, because pg_locale.c sets LC_MESSAGES "for real"
> precisely so that strerror() will see it.

Isn't LC_MESSAGES also necessary for gettext()?

If it's only strerror() we care about, then we could use uselocale()
instead, because the platforms that don't support uselocale() also
don't seem to do translation in strerror(). (I think only glibc
translates through strerror(), though I've seen hints that Solaris may
also.)

Regards,
    Jeff Davis




pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: 17f446784d54da827f74c2acc0fa772a41b92354 breaks orafce build
Next
From: Jeff Davis
Date:
Subject: Re: NLS: use gettext() to translate system error messages