On 11/25/2018 01:08 AM, BLFS Trac wrote:
#11193: Locale settings in /etc/profile.d/i18n.sh and /etc/locale.conf --------------------+----------------------- Reporter: xry111 | Owner: renodr Type: task | Status: assigned Priority: normal | Milestone: 8.4 Component: BOOK | Version: systemd Severity: normal | Resolution: Keywords: | --------------------+-----------------------Comment (by dj@…): This is overkill for defaults IMO. I would simply do the equivalent of. /etc/locale.conf && export LANG for systemd. The long export line is likely unneeded if $LC_ALL==$LANG. I can not see a use case for them differing for system use, and I'd likely expect that LC_ALL=$LANG for the system default, but this may be biased as I am only familiar with Germanic and Romance languages (and fluently, only US English at that). If systemd itself can make use of these additional values, and they should differ, then this should be covered in LFS-systemd, else on this page before the commands to create the file. A note explaining that you might want to export additional variables before the commands would be probably be best with the existing links to locale issues. Additionally, this is only used by users who do not have these values set in ~/.bash{_profile,rc} (or the equivalent for dash or zsh or .profile). Again, I do think a comment is warranted to make it more clear what is expected. Though do as you please on your personal systems, it should probably be considered bad practice to source /etc/locale.conf for the user's .profile on a multilingual system (conversely, it is completely acceptable to use the same values in /etc/skel as defaults if the expected users are to be of common language). I'm going to do just the systemd separation and wait for more input on the above...specifically for use cases where the individual LC* variables need to differ. Xi (or anybody outside of my bias really), any further input to assist in combating my own ignorance WRT other locales would be greatly appreciated. :-) For reference: {{{ dj@LFSDT1 [ ~ ]$ echo $LC_ALL dj@LFSDT1 [ ~ ]$ echo $LANG en_US.UTF-8 dj@LFSDT1 [ ~ ]$ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= dj@LFSDT1 [ ~ ]$ }}}
I'm not sure it makes a difference, but when I do a 'locale -a', it lists en_US.utf8 but not en_US.UTF-8.
My non-english capabilities are also severely limited. At one time, we had an editor, Alexander E. Patrakov, who spent a lot of time updating the book(s) for internationalization issues. Unfortunately we have not seen Alexander on the lists in many years.
Patches to the books that update i18n issues would be gladly accepted. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/blfs-book FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
