Description\n-----------\n\nMariaDB server error messages are by default in English. However, MariaDB server also supports error message localization in many different languages. Each supported language has its own version of the error message file called errmsg.sys in a dedicated directory for that language.\n\nSupported Languages for Error Messages\n\nError message localization is supported for the following languages:\n\n Bulgarian\n Chinese (from MariaDB 10.4.25, 10.5.16, 10.6.8, 10.7.4, 10.8.3)\n Czech\n Danish\n Dutch\n English\n Estonian\n French\n Georgian (from MariaDB 10.11.3)\n German\n Greek\n Hindi\n Hungarian\n Italian\n Japanese\n Korean\n Norwegian\n Norwegian-ny (Nynorsk)\n Polish\n Portuguese\n Romanian\n Russian\n Serbian\n Slovak\n Spanish\n Swahili (from MariaDB 11.1.2)\n Swedish\n Ukrainian\n\nSetting the lc_messages and lc_messages_dir System Variables\n\nThe lc_messages and lc_messages_dir system variables can be used to set the server locale used for error messages.\n\nThe lc_messages system variable can be specified as a locale name. The language of the associated locale will be used for error messages. See Server Locales for a list of supported locales and their associated languages.\n\nThe lc_messages system variable is set to en_US by default, which means that error messages are in English by default.\n\nIf the lc_messages system variable is set to a valid locale name, but the server can't find an error message file for the language associated with the locale, then the default language will be used instead.\n\nThis system variable can be specified as command-line arguments to mariadbd or it can be specified in a relevant server option group in an option file. For example:\n\n``ini\n[mariadb]\n...\nlc_messages=fr_CA\n`\n\nThe lc_messages system variable can also be changed dynamically with SET GLOBAL. For example:\n\n`sql\nSET GLOBAL lc_messages='fr_CA';\n`\n\nIf a server has the lc_messages system variable set to the fr_CA locale like the above example, then error messages would be in French. For example:\n\n`sql\nSELECT blah;\nERROR 1054 (42S22): Champ 'blah' inconnu dans field list\n`\n\nThe lc_messages_dir system variable can be specified either as the path to the directory storing the server's error message files or as the path to the directory storing the specific language's error message file.\n\nThe server initially tries to interpret the value of the lc_messages_dir system variable as a path to the directory storing the server's error message files. Therefore, it constructs the path to the language's error message file by concatenating the value of the lc_messages_dir system variable with the language name of the locale specified by the lc_messages system variable .\n\nIf the server does not find the error message file for the language, then it tries to interpret the value of the lc_messages_dir system variable as a direct path to the directory storing the specific language's error message file.\n\nThis system variable can be specified as command-line arguments to mariadbd or it can be specified in a relevant server option group in an option file.\n\nFor example, to specify the path to the directory storing the server's error message files:\n\n`ini\n[mariadb]\n...\nlc_messages_dir=/usr/share/mysql/\n`\n\nOr to specify the path to the directory storing the specific language's error message file:\n\n`ini\n[mariadb]\n...\nlc_messages_dir=/usr/share/mysql/french/\n`\n\nThe lc_messages_dir system variable can not be changed dynamically.\n\nSetting the --language Option\n\nThe --language option can also be used to set the server's language for error messages, but it is deprecated. It is recommended to set the lc_messages system variable instead.\n\nThe --language option can be specified either as a language name or as the path to the directory storing the language's error message file. See Server Locales for a list of supported locales and their associated languages.\n\nThis option can be specified as command-line arguments to mariadbd or it can be specified in a relevant server option group in an option file.\n\nFor example, to specify a language name:\n\n`ini\n[mariadb]\n...\nlanguage=french\n`\n\nOr to specify the path to the directory storing the language's error message file:\n\n`ini\n[mariadb]\n...\nlanguage=/usr/share/mysql/french/\n``\n\nCharacter Set\n\nThe character set that the error messages are returned in is determined by the character_set_results variable, which defaults to UTF8.\n\nURL: https://mariadb.com/docs/server/reference/data-types/string-data-types/character-sets/internationalization-and-localization/setting-the-language-for-error-messages