Re: translating exception messages of postgresql functions - Mailing list pgsql-admin

From Tom Lane
Subject Re: translating exception messages of postgresql functions
Date
Msg-id 20999.1210782739@sss.pgh.pa.us
Whole thread Raw
In response to Re: translating exception messages of postgresql functions  (Julius Tuskenis <julius@nsoft.lt>)
Responses Re: translating exception messages of postgresql functions
List pgsql-admin
Julius Tuskenis <julius@nsoft.lt> writes:
> Alvaro Herrera rašė:
>> You want to translate it from english to another language, or you want
>> to change the nature of the message reported?  If you just want to
>> translate it to another language, see here:
>>
>> http://pgtranslation.projects.postgresql.org/status.html
>>
> Thank you, Alvaro, but it seems you have slightly misunderstood me. I
> want to translate the exceptions I rise myself. That is I do RAISE
> EXCEPT 'user "%" not found', prm_user; in pl/pgsql function, but I want
> the user to see it translated to the language he uses.

I wonder if it would help to make plpgsql pass the RAISE format string
through gettext?

This would only be a usable approach if there were some fairly easy way
to add installation-specific translations to gettext's table.  I don't
know enough about gettext to know if that's doable.

            regards, tom lane

pgsql-admin by date:

Previous
From: Julius Tuskenis
Date:
Subject: Re: translating exception messages of postgresql functions
Next
From: Alvaro Herrera
Date:
Subject: Re: translating exception messages of postgresql functions