Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set LANG variable in Windows?

I'm making an application that supports multi language. And I am using gettext and locale to solve this issue.

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

And it will automatically set the locale to that particular language. But in Windows, the

C:\>SET LANG=en_US python appname.py

or

C:\>SET LANG=en_US

C:\>python appname.py

doesn't work.

like image 296
b3rx Avatar asked Dec 22 '22 10:12

b3rx


1 Answers

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.

like image 169
Pavel Minaev Avatar answered Jan 04 '23 20:01

Pavel Minaev