如何在Windows中设置LANG变量? [英] How to set LANG variable in Windows?
问题描述
我正在制作一个支持多语言的应用程序.我正在使用gettext
和locale
来解决此问题.
I'm making an application that supports multi language. And I am using gettext
and locale
to solve this issue.
如何在Windows中设置LANG变量?在Linux和类似Unix的系统中,它就像
How to set LANG variable in Windows? In Linux and Unix-like systems it's just as simple as
$ LANG=en_US python appname.py
它将自动将语言环境设置为该特定语言.但是在Windows中,
And it will automatically set the locale to that particular language. But in Windows, the
C:\>SET LANG=en_US python appname.py
或
C:\>SET LANG=en_US
C:\>python appname.py
不起作用.
推荐答案
Windows区域设置支持不依赖LANG变量(或者,实际上,任何其他环境变量).用户可以在控制面板"中将其设置为任何内容.
Windows locale support doesn't rely on LANG variable (or, indeed, any other environmental variable). It is whatever the user set it to in Control Panel.
这篇关于如何在Windows中设置LANG变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!