如何为mysql的错误消息添加新的语言? [英] How to add a new language for mysql's error messages?
问题描述
在$ MySqlHome/share文件夹中,有25个子文件夹(25种语言)和errmsg-utf8.txt文件,其中包含错误消息的翻译.在每个子文件夹下都有一个errmsg.sys.
In $MySqlHome/share folder, there are 25 subfolders (25 languages) and errmsg-utf8.txt file which contains translations of the error messages. Under each subfolder there is a errmsg.sys.
我想添加一种新语言(zh-CN)并翻译一些消息.
I'd like to add a new language (zh-CN) and translate some of the messages.
该怎么做?
推荐答案
要编辑的源文件是sql/share/errmsg-utf8.txt
在此文件的顶部,一行类似
At the top of this file, a line like
languages ... french=fre ...
声明带有缩写的语言列表.
declares the list of languages with abbreviations.
在构建过程中,程序comp_err
在sql/share
During the build, the program comp_err
generates the language files under sql/share
如果您在标头中添加新语言,则应选择它.
If you add a new language in the header, it should pick it up.
还要查看文件sql/share/cmake_install.cmake
安装每个生成的语言文件.
Look also at file sql/share/cmake_install.cmake
to install each generated language file.
注意:此处列出的所有文件均属于MySQL源代码,您需要从源代码进行构建才能使用错误生成器(comp_err
)
Note: All the files listed here belong to the MySQL source code, you need to build from source to use the error generator (comp_err
)
这篇关于如何为mysql的错误消息添加新的语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!