Re: Chinese translations not applied correctly on PostgreSQL 18 Windows

From: elodie <beifu23(at)foxmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Chinese translations not applied correctly on PostgreSQL 18 Windows
Date: 2026-04-24 02:02:15
Message-ID: tencent_6BA137F0A6610F6857E7CBB609C024D1D705@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thanks Tom! Setting lc_messages = 'zh_CN'&nbsp;fixed the issue. The Chinese translations are now working well.

Thanks and Best Regards!

Elodie Fu

elodie
beifu23(at)foxmail(dot)com

Original


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us&gt;
Date: 2026-04-24 05:28
To: elodie <beifu23(at)foxmail(dot)com&gt;
Cc: pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org&gt;
Subject: Re: Chinese translations not applied correctly on PostgreSQL 18 Windows

"=?utf-8?B?ZWxvZGll?="&nbsp;<beifu23(at)foxmail(dot)com&gt;&nbsp;writes:
&gt;&nbsp;Steps&nbsp;to&nbsp;reproduce:
&gt;&nbsp;1.&nbsp;Install&nbsp;PostgreSQL&nbsp;18&nbsp;on&nbsp;Windows
&gt;&nbsp;2.&nbsp;Set&nbsp;environment:&nbsp;LANG=zh_CN,&nbsp;chcp&nbsp;936
&gt;&nbsp;3.&nbsp;Run&nbsp;psql&nbsp;and&nbsp;execute:&nbsp;INSERT&nbsp;INTO&nbsp;tb&nbsp;(c)&nbsp;VALUES&nbsp;('a\O\0');

Setting&nbsp;that&nbsp;environment&nbsp;variable&nbsp;isn't&nbsp;sufficient.&nbsp;&nbsp;It'll&nbsp;cause
psql&nbsp;to&nbsp;translate&nbsp;messages&nbsp;that&nbsp;it&nbsp;generates&nbsp;locally,&nbsp;but&nbsp;to&nbsp;get
translated&nbsp;messages&nbsp;from&nbsp;the&nbsp;server,&nbsp;you&nbsp;need&nbsp;to&nbsp;set&nbsp;the&nbsp;server's
lc_messages&nbsp;parameter.&nbsp;&nbsp;I&nbsp;speak&nbsp;no&nbsp;Chinese,&nbsp;so&nbsp;I&nbsp;can't&nbsp;really
read&nbsp;your&nbsp;example,&nbsp;but&nbsp;here's&nbsp;an&nbsp;example&nbsp;using&nbsp;French:

$&nbsp;LANG=fr_FR.utf8&nbsp;psql
psql&nbsp;(19devel)
Saisissez&nbsp;«&nbsp;help&nbsp;»&nbsp;pour&nbsp;l'aide.

postgres=#&nbsp;select&nbsp;1/0;
ERROR:&nbsp;&nbsp;division&nbsp;by&nbsp;zero
postgres=#&nbsp;set&nbsp;lc_messages&nbsp;=&nbsp;'fr_FR';
SET
postgres=#&nbsp;select&nbsp;1/0;
ERREUR:&nbsp;&nbsp;division&nbsp;par&nbsp;zéro

You&nbsp;can&nbsp;use&nbsp;any&nbsp;of&nbsp;the&nbsp;various&nbsp;ways&nbsp;of&nbsp;setting&nbsp;a&nbsp;server&nbsp;parameter
to&nbsp;install&nbsp;that&nbsp;setting&nbsp;on&nbsp;a&nbsp;more&nbsp;permanent&nbsp;basis.

regards,&nbsp;tom&nbsp;lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message elodie 2026-04-24 02:25:56 Typo in Chinese translation: "转移" should be "转义"
Previous Message Michael Paquier 2026-04-23 22:14:18 Re: to_date()/to_timestamp() silently accept month=0 and day=0