【发布时间】:2015-05-31 00:38:38
【问题描述】:
设置 LC_MESSAGES 将消息(在我的情况下)从俄罗斯更改为英文。
$ env | grep UTF
LC_MESSAGES=en_US.UTF-8
LANG=ru_UA.UTF-8
$ git status .
On branch master
Your branch is ahead of 'origin/master' by 11 commits.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
一切似乎都很好,但是通过 ssh 连接到该主机。尽管有变量 LC_MESSAGES,但仍将消息发送回俄罗斯。看:
$ ssh user@localhost
$ env | grep UTF
LC_MESSAGES=en_US.UTF-8
LANG=ru_UA.UTF-8
$ git status .
В ветке master
Your branch is ahead of 'origin/master' by 11 commits.
(use "git push" to publish your local commits)
нечего фиксировать, рабочая директория пуста
如何在俄罗斯离开界面但强制消息为英文?
$ unname -a Linux KES-PC 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
【问题讨论】:
-
locale在这两种情况下的输出是什么? -
@thatotherguy:区别在于 LANGUAGE=ru_UA:ru,在 ssh 中设置。它设置在 /etc/default/locale,但在第一种情况下(在我的正常会话中)谁取消了该环境? superuser.com/questions/392439/…
-
@thatotherguy:优先级不起作用
LANGUAGE=en:ru或LANGUAGE=ru:en在这两种情况下都显示俄罗斯的消息。LC_MESSAGES设置为en_US.UTF-8
标签: linux localization linux-mint