php WAMP/MySQL 错误的语言不正确
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23802970/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
WAMP/MySQL errors not in correct language
提问by Dobby
I've re-installed WAMP multiple times, searched literally hundreds of pages, and its not fixed this issue:
我已经多次重新安装 WAMP,搜索了数百页,但没有解决这个问题:
I've looked inside the phpmyadmin config files, set:
我查看了 phpmyadmin 配置文件,设置:
$cfg['Lang'] = 'en-utf-8';
Uninstalled multiple times (as mentioned) and seemed to have no luck what so ever. Any help would be appreciated.
多次卸载(如上所述)并且似乎没有任何运气。任何帮助,将不胜感激。
回答by RiggsFolly
To change the language that MySQL uses when reporting you need to change the my.ini
file as follows.
要更改 MySQL 在报告时使用的语言,您需要my.ini
按如下方式更改文件。
Find this line:
找到这一行:
# Change your locale here !
lc-messages=fr_FR
And change it to your prefered language, for example:
并将其更改为您喜欢的语言,例如:
lc-messages=en_GB
To change it to English US, you can do like this:
要将其更改为美国英语,您可以这样做:
lc-messages=en_US
Save the file and then restart MySQL.
保存文件,然后重新启动 MySQL。
left click wampmanager icon -> MySQL -> Service -> Restart Service
Remember the guys that produce WampServer are French so I guess thats why this has been added to the my.ini
file, and they just forgot to remove it on this release.
请记住,生产 WampServer 的人是法国人,所以我想这就是将其添加到my.ini
文件中的原因,而他们只是忘记在此版本中将其删除。
How to Find my.ini in WAMPServer
如何在 WAMPServer 中查找 my.ini
Use the wampmanager menus like so :-
像这样使用 wampmanager 菜单:-
left click wampmanager icon -> MySQL -> my.ini
This will load the my.ini file into your editor.
这会将 my.ini 文件加载到您的编辑器中。
Here you can find a list of valid locales
在这里您可以找到有效语言环境的列表
回答by Rooha Ali
Change the following settings in my.ini file
更改 my.ini 文件中的以下设置
lc-messages=en_US
To permanently change the language preferences
永久更改语言首选项
回答by Eugen Rieck
$cfg['Lang'] = 'en-utf-8';
and friends change the language for phpmysql, not for the mysql server, so anything coming from the database server itself will be unaffected.
$cfg['Lang'] = 'en-utf-8';
和朋友更改了phpmysql的语言,而不是mysql服务器的语言,因此来自数据库服务器本身的任何内容都不会受到影响。
You need to start the server daemon with --lc_messages=en_US
(or put that in the relevant config file), for a per-session setting just use SET lc_messages = 'en_US';
您需要使用--lc_messages=en_US
(或将其放在相关的配置文件中)启动服务器守护程序,对于每个会话的设置,只需使用SET lc_messages = 'en_US';