Search code examples
mysqlxampp

Translate MySQL error messages to new language


I want to translate MySQL's error messages. I tried:

  1. Added new language to sql/share/errmsg-utf8.txt's top line. (image)
  2. Translated some error messages. (image)

But there is no comp_err or sql/share/cmake_install.cmake in mysql folder and in shell.

I'm using xampp v3.3.0. Also tried MySQL 8.0.


Solution

  • Never edit directly the file installed.

    Instead, modify the source code and build the error messages file again.

    What you should do:

    • Create a git branch based on MySQL source tree (https://github.com/mysql/mysql-server), for the proper release (say 8.0)
    • Do a full build (this will create the comp_err utility too)
    • Read instructions in file share/errmsg_readme.txt
    • Edit file share/messages_to_clients.txt with the new translation
    • Commit the changes in git
    • Do a build again

    This will create the file containing error messages with the new translation, which can be installed.