FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 09-15-2010, 12:22 PM
Ian-Xue Li
 
Default changed locale behavior /etc/rc.sysinit

Hi,

The new /etc/rc.sysinit introduced in initscripts-2010.07-1 has changed
the original behavior of locale settings.

The Code explains better:

369 # Flush old locale settings
370 : >| /etc/profile.d/locale.sh
371 /bin/chmod 755 /etc/profile.d/locale.sh
372 # Set user defined locale
373 [ -z "$LOCALE" ] && LOCALE="en_US"
375 echo "export LANG=$LOCALE" >>/etc/profile.d/locale.sh

Now it flushes /etc/profile.d/locale.sh everytime the system boots. Usually this means
setting `export LANG=en_US.UTF-8' on most computers, and to be included
by shell (.bashrc or .zshrc) everytime, if the user included it at all.
I.e.: source /etc/profile

But for multilingual users, due to the fact that the initial console
only displays ASCII, we often write the local LANG and LC_ALL setting in
xinitrc, so to make an environment that uses English under console and
local (multibyte) language within Xorg.

With the introduction of /etc/profile.d/locale.sh, it would make a
problem that cause Xorg program still using en_US when where we wanted
zh_TW or zh_CN.

My solution is as follows, changing some code in /etc/profile:

49 if test -d /etc/profile.d/; then
50 for profile in /etc/profile.d/*.sh; do
51 if [[ $profile == "/etc/profile.d/locale.sh" && -n $DISPLAY ]]; then
52 continue
53 fi
54 test -x $profile && . $profile
55 done
56 unset profile
57 fi

--
李彥* (Li Ian-Xue)
http://b4283.ath.cx

A student.
 

Thread Tools




All times are GMT. The time now is 10:14 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org