First, you must specify--enable-nls= "language name" before compiling, otherwise there will be no multilanguage support, such as--enable-nls= "ZH_CN"
Of course disabling the NLS can lead to a negligible performance boost
When enabled we will see in Makefile.global:
Enable_nls= Yes...ifeq ($ (ENABLE_NLS), yes) Ifneq (, $ (wildcard $ (srcdir)/nls.mk)) include $ (top_srcdir)/src/ NLS-GLOBAL.MKENDIF # nls.mkendif # ENABLE_NLS
As you can see, only the directory has nls.mk this file will have the NLS action, with find it is easy to know which directories need to generate. po File
Let's say we modify the output information of INITDB.
CD Src/bin/initdb
Make Update-po
From the output text can be seen, initdb.pot (translation template) regenerated, and only we need to ZH_CN is merge, generate a new file zh_CN.po.new
Open zh_CN.po.new Edit, change to Zh_cn.po after completion
Make All-po to this point, the new. Mo file has been regenerated
Graphical. po file editing tools recommended: http://poedit.net/, if not open, please turn over the wall.
Shenzhou Flying Elephant (Beijing) Data Technology Co., Ltd.
How to regenerate PostgreSQL's internationalized files