Linux 在 WINE 中更改语言环境
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10478508/
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
Changing the Locale in WINE
提问by Zaid Amir
I'm using wine emulator on linux (SliTaz 4.0) and i want to change the wine locale so that the dialogs and messages are displayed in Japanese.
我在 linux (SliTaz 4.0) 上使用 wine 模拟器,我想更改 wine 语言环境,以便对话框和消息以日语显示。
I found this tool http://code.google.com/p/winelocale/which seems to do the job but I couldn't find a download link anywhere and could not contact the author, so does anybody know how to do that please?
我发现这个工具http://code.google.com/p/winelocale/似乎可以完成这项工作,但我在任何地方都找不到下载链接,也无法联系作者,所以有人知道怎么做吗?
I am not actually certain if this tool (WINELocale) will actually work, so I am open to any suggestions to change the locale of WINE to Japanese.
我实际上不确定这个工具 (WINELocale) 是否真的有效,所以我愿意接受任何将 WINE 的语言环境更改为日语的建议。
Thanks
谢谢
采纳答案by K1773R
LC_ALL="ja_JP"
another example to do it ;)
另一个例子来做到这一点;)
回答by K1773R
export LANG="ja_JP"
after this wine changes its locale to japanese, altough remember to install fonts for japanese, otherwise it will look like garbage!
这酒把locale改成日文后,还是要记得安装日文字体,不然会很垃圾!
if u close the terminal, the settings for the locale will be lost. a cleaner way would be:
如果您关闭终端,则语言环境的设置将丢失。更清洁的方法是:
LANG="ja_JP" winecfg
as example, so only this "process (and childs)" will be affected, remember to use it for wine too like this:
例如,所以只有这个“进程(和孩子)”会受到影响,记住也像这样将它用于葡萄酒:
LANG="ja_JP" wine YourBinary.exe
回答by Michal Selmi Seliga
in Ubuntu 13.04 i had to use
在 Ubuntu 13.04 中我不得不使用
LANG="ja_JP.UTF8" wine YourBinary.exe
回答by szx
You can also change the locale for all applications via Registry, by setting the LC_ALL
environment variable in HKEY_CURRENT_USER\Environment
(Right click -> New -> String value).
您还可以通过注册表更改所有应用程序的区域设置,方法是LC_ALL
在HKEY_CURRENT_USER\Environment
(右键单击 -> 新建 -> 字符串值)中设置环境变量。
回答by Ben
As others have said, export LANG="ja_JP"
should work.
正如其他人所说,export LANG="ja_JP"
应该工作。
But make sure you have that locale installed, or it won't. How to install it depends on your distribution, but to check whether it is available or not, you can simply run locale -a
in a terminal and it will list the locales available for use.
但是请确保您安装了该语言环境,否则不会。如何安装它取决于你的发行版,但要检查它是否可用,你可以简单地locale -a
在终端中运行,它会列出可用的语言环境。
回答by Wyatt8740
I had to edit /etc/locale.gen
and un-comment these two lines:
我不得不编辑/etc/locale.gen
并取消注释这两行:
ja_JP.EUC-JP EUC-JP
ja_JP.UTF-8 UTF-8
After that, I ran locale-gen
(as root), and when it finished generating locales simply setting LANG=ja_JP.utf8
worked. The key was generating locale information first, it seems.
之后,我locale-gen
(以 root 身份)运行,当它完成生成语言环境时,只需设置即可LANG=ja_JP.utf8
。看来,关键是首先生成语言环境信息。
Also, if you haven't got any, you'll need to install a japanese font on your system.
此外,如果您还没有,则需要在系统上安装日文字体。
My distribution is Debian Sid, if anyone wonders, but I believe this is also what you need to do in Arch and Ubuntu and most other distros.
如果有人想知道,我的发行版是 Debian Sid,但我相信这也是您在 Arch 和 Ubuntu 以及大多数其他发行版中需要做的。
回答by user11624578
LANG=ja_JP
doesn't seem default to utf8 on my machine. (Maybe because it's lower in locale.gen?)
LANG=ja_JP
在我的机器上似乎没有默认为 utf8。(也许是因为它在 locale.gen 中较低?)
LANG=ja_JP.UTF-8
works.
LANG=ja_JP.UTF-8
作品。