Talk:Locale

From ArchWiki
Latest comment: 12 August 2023 by Nl6720 in topic use localectl from systemd?

Create custom locale

[Moved from the main article. -- Alad (talk) 23:15, 24 February 2016 (UTC)]Reply[reply]

Modified locales will not survive the upgrade of glibc because the relevant file is not in the backup field in the PKGBUILD. Custom locales should be created instead. -- User:Lahwaacz 08:59, 22 December 2014


Customizing locales

Locales are defined in text files located in /usr/share/i18n/locales/ and can be edited to adapt to particular needs.

After editing a locale file, do not forget to re-generate the locales for the changes to take effect after reboot.

Setting the first day of the week

In many countries the first day of the week is Monday. To adjust this, change or add the following lines:

/usr/share/i18n/locales/chosen_locale
LC_TIME
[...]
week            7;19971130;5
first_weekday   2
first_workday   2

Login manager missing

This article does not cover the login manager. I have my system in *German*, but my login manager is still using the *English* keyboard layout, and I don't know how to change it. Locale does not cover it, and I couldn't find anything in Display manager neither - albeit there is a comment that it is missing and *should* be linked here.

So How do I change the locale in the display manager?

--Nerdoc (talk) 04:33, 10 March 2016 (UTC)Reply[reply]

"The" display manager, there's a few dozen of them. So which do you use? -- Alad (talk) 14:37, 10 March 2016 (UTC)Reply[reply]
Should Xorg/Keyboard configuration consulted? Despite the name, does locale, as described in this article, meant to be a solution for any issue concerning non English usage? Regid (talk) 12:05, 28 December 2018 (UTC)Reply[reply]

Brackets

Regarding [1], this is mentioned in man-pages(7), but I don't see it in Help:Reading or Help:Style/Formatting and punctuation. If not present, it could be a good addition, or at least, mention the meaning of the brackets in this article. -- Alad (talk) 17:54, 26 August 2016 (UTC)Reply[reply]

It's not exactly wiki style as covered by Help:Reading, but a de facto standard (sometimes more than that). It's needed only rarely so it should be handled case by case. Feel free to explain it on this page. -- Lahwaacz (talk) 18:11, 26 August 2016 (UTC)Reply[reply]
Help:Style/Formatting and punctuation#Pseudo-variables in file/command line contents was designed to be Simple, but of course it can hardly be applied to complex syntaxes. I agree that in these cases we should rely on the upstream syntax and possibly explain what may not be immediately clear for readers. – Kynikos (talk) 03:44, 27 August 2016 (UTC)Reply[reply]

Errors in CHROOT under ANOTHER OS (solution)

While installing, I used a chroot under Ubuntu (My 3G Modem is not yet working in Arch).

I set up everything right, but the following error message would not go away:

root@cursor/sda8:~ # cat /etc/locale.conf 
LANG=en_US.UTF-8
LC_MESSAGES=C
root@cursor/sda8:~ # locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_AT.UTF-8
...

Simply rebooting into Arch made the message disappear. Perhaps this hint saves other people some headache.

Hmw (talk) 17:30, 19 May 2018 (UTC)Reply[reply]

Mention uncommenting and regenerating

Several areas suggest editing /etc/locale.conf, such as to change the date or time format. I think it would be helpful to add a link with text like "Uncomment the new locale and re-generate locales" which would be a link to Locale#Generating locales. This would duplicate the link several places in the article, so wanted to open it up for discussion. A similar duplication of links happens reminding users to enable and start systemd services. Alternatively, something could be added either in Locale#Generating locales itself that says this has to be done when later making changes, but some users will undoubtedly miss that. Jamespharvey20 (talk) 03:33, 24 August 2019 (UTC)Reply[reply]

use localectl from systemd?

Maybe we should suggest to use localectl from systemd for setting the AND generating the locales

       * systemd-localed may now call locale-gen to generate missing locales
         on-demand (UTF-8-only). This improves integration with Debian-based
         distributions (Debian/Ubuntu/PureOS/Tanglu/...) and Arch Linux.

https://github.com/systemd/systemd/blob/v248/NEWS#L325-L327

—This unsigned comment is by Gdamjan (talk) 2023-08-11T18:49:10. Please sign your posts with ~~~~!

systemd-localed doesn't change the /etc/locale.gen file, so won't this cause issues after a glibc update where locale-gen is run, but the locale set in /etc/locale.conf is not uncommented in /etc/locale.gen? -- nl6720 (talk) 08:45, 12 August 2023 (UTC)Reply[reply]
Never mind. systemd-localed actually does update the /etc/locale.gen file. -- nl6720 (talk) 08:51, 12 August 2023 (UTC)Reply[reply]