Fedora LXC templates locale issues

sHAsHiLx

Renowned Member
May 17, 2015
10
0
66
I can successfully set locale in it:

Code:
[root@fedora ~]# localectl set-locale ru_RU.UTF-8
[root@fedora ~]# localectl status
   System Locale: LANG=ru_RU.UTF-8
       VC Keymap: us
      X11 Layout: us
[root@fedora ~]# locale
LANG=ru_RU.UTF-8
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=

but programs didn't use it - for example - tried to run date - it tells date in russian, dnf english, midnight commander interface language english and help in russian. If I do the same things in VM and not LXC - it will be all fine and all mesages will be localized. Can't understand what's wrong with LXC and how I can tell programs use localized message output (this is for all Fedora LXC templates. Debian/Ubuntu LXC templates have no issues with locales).
 
Last edited:
hi,

it works here if i set in /etc/locale.conf:
Code:
[root@fedora-32 ~]# cat /etc/locale.conf
LANG=ru_RU.UTF-8
LC_ALL=ru_RU.UTF-8

Screenshot from 2020-11-30 10-46-51.png


how are you entering/connecting the container? what does env say?

also which template did you use?
 
Last edited:
No it not work and your screenshot proove this - look at top menu - it's in english. Run, for example - dnf update - it will be all in english (the same things will all be in russian if you install Fedora in VM from iso). Also adding LC_ALL=ru_RU.UTF-8 to /etc/locale.conf not set LC_ALL variable not after relogin nor after reboot. Setting this variable by hand also does nothing to localize messages.
 
Last edited:
No it not work and your screenshot proove this - look at top menu - it's in english. Run, for example - dnf update - it will be all in english. Also adding LC_ALL=ru_RU.UTF-8 to /etc/locale.conf not set LC_ALL variable not after relogin nor after reboot. Setting this variable by hand also does nothing to localize messages.
yes, you're right.

strace shows the necessary language files are missing. i'll let you know after investigating more
 
Thanks for the vector of investigating!
I've traced it and it's really telling about localization files is missing
Code:
14:15:41.656715 openat(AT_FDCWD, "/usr/share/locale/ru_RU.UTF-8/LC_MESSAGES/mc.mo", O_RDONLY) = -1 ENOENT (Нет такого файла или каталога) <0.000031>
14:15:41.656824 openat(AT_FDCWD, "/usr/share/locale/ru_RU.utf8/LC_MESSAGES/mc.mo", O_RDONLY) = -1 ENOENT (Нет такого файла или каталога) <0.000028>
14:15:41.656930 openat(AT_FDCWD, "/usr/share/locale/ru_RU/LC_MESSAGES/mc.mo", O_RDONLY) = -1 ENOENT (Нет такого файла или каталога) <0.000030>
14:15:41.657037 openat(AT_FDCWD, "/usr/share/locale/ru.UTF-8/LC_MESSAGES/mc.mo", O_RDONLY) = -1 ENOENT (Нет такого файла или каталога) <0.000029>
14:15:41.657144 openat(AT_FDCWD, "/usr/share/locale/ru.utf8/LC_MESSAGES/mc.mo", O_RDONLY) = -1 ENOENT (Нет такого файла или каталога) <0.000028>
14:15:41.657249 openat(AT_FDCWD, "/usr/share/locale/ru/LC_MESSAGES/mc.mo", O_RDONLY) = -1 ENOENT (Нет такого файла или каталога) <0.000037>

but i've checked downloaded rpm by issuing 'dnf download mc' and see that it have needed localization files in it - also checked others rpm - all of them have localization but for some reason it's not installed. So I thinks it's something that tells dnf not install localization files.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!