Closed infoman closed 3 years ago
The default culture is determined by the ICU uloc_getDefault
function. Looking at the docs, it looks like there are env vars with a higher precedence than LANG
. Do you perhaps have something set in LC_ALL
or LC_MESSAGES
?
Also, which distro and kernel version are you running?
I'm on Ubuntu 18.04 with kernel 5.4.0-66-generic
I looked at the environment of the launcher by doing strings /proc/pid/environ
and apparently Steam somewhere sets LC_ALL=C
, but I can't find the source of it
Do you also see HOST_LC_ALL
set? It looks like steam sets LC_ALL=C
to help some games run but it might also set HOST_LC_ALL
. What output do you get when you run locale
?
Turns out that Proton has a block that handles this. I imagine if I implement the same thing, it should fix this issue. I'll update the issue when I've pushed a new build for you to try.
def init_wine(self):
if "HOST_LC_ALL" in self.env and len(self.env["HOST_LC_ALL"]) > 0:
#steam sets LC_ALL=C to help some games, but Wine requires the real value
#in order to do path conversion between win32 and host. steam sets
#HOST_LC_ALL to allow us to use the real value.
self.env["LC_ALL"] = self.env["HOST_LC_ALL"]
else:
self.env.pop("LC_ALL", "")
Do you also see
HOST_LC_ALL
set?
No
$ grep LC /tmp/steam.env
LC_ALL=C
$ grep LANG /tmp/steam.env
LANGUAGE=
LANG=ru_RU.UTF-8
$ locale
LANG=ru_RU.UTF-8
LANGUAGE=
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=
I wasn't able to get HOST_LC_ALL
to be set on my machine either which means I can't know what the original LC_ALL
value is. I'm wondering if that proton comment is out of date.
The fix for this is to set LC_ALL
to the correct value in the game's launch options within steam (or set language
in settings.json). e.g. LC_ALL=ru_RU.UTF-8 alacritty -e ./MinEdLauncher %command% /autoquit /EDH
. I'll add this info to the readme.
Strangely enough, that LC_ALL
variable gets lost somewhere and the actual game process doesn't have it set
Well, I had a typo when looking for HOST_LC_ALL
. It looks like steam sets HOST_LC_ALL
if LC_ALL
is set. I should be able to implement the same fix that proton uses to get the correct game language.
When config language is set to
null
, the game is run with/language English\\UK
parameter despite havingLANG=ru_RU.UTF-8
environment variable set