Re: Language in FreeBSD

看板FB_questions作者時間11年前 (2014/06/18 11:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串5/7 (看更多)
On Tue, 17 Jun 2014 22:23:04 +0200, ddddd dddd wrote: > > Programs usually support the LC_* variables (LC_MESSAGES for > > example, LC_ALL to override) as well as LANG. You can try to > > set those in your ~/.login if the C shell is your login shell, > > or in ~/.login_conf, for example like this: > > > > me:\ > > :charset=iso-8859-1:\ > > :lang=de_DE.ISO8859-1: > > > > Note that you probably will use UTF-8 instead of ISO-8859-1 > > if you want to be "future-proof". :-) > Well, I tried :lang=no_NO with ISO8859-1, ISO8859-15 and UTF-8, > the $LANG variable were always empty. According to "man login.conf", setting lang= will set $LANG, but it will not set any of the LC_* variables. If I remember correctly, $LANG has precedence. If you want to set LC_* variables via ~/.login_conf, you can use the setenv= parameter. > > Maybe you can add some C shell specific environmental settings. > > Here are some examples: > > > > # german input, english messages > > setenv LC_ALL en_US.ISO8859-1 > > setenv LC_MESSAGES en_US.ISO8859-1 > > setenv LC_COLLATE de_DE.ISO8859-1 > > setenv LC_CTYPE de_DE.ISO8859-1 > > setenv LC_MONETARY de_DE.ISO8859-1 > > setenv LC_NUMERIC de_DE.ISO8859-1 > > setenv LC_TIME de_DE.ISO8859-1 > > unsetenv LANG > > > > # german with Euro sign > > setenv LC_ALL de_DE.ISO8859-15 > > setenv LC_COLLATE de_DE.ISO8859-15 > > setenv LC_CTYPE de_DE.ISO8859-15 > > setenv LC_MESSAGES de_DE.ISO8859-15 > > setenv LC_MONETARY de_DE.ISO8859-15 > > setenv LC_NUMERIC de_DE.ISO8859-15 > > setenv LC_TIME de_DE.ISO8859-15 > > > > # german with UTF-8 ("more international") > > setenv LC_ALL en_US.UTF-8 > > setenv LC_MESSAGES en_US.UTF-8 > > setenv LC_COLLATE de_DE.UTF-8 > > setenv LC_CTYPE de_DE.UTF-8 > > setenv LC_MONETARY de_DE.UTF-8 > > setenv LC_NUMERIC de_DE.UTF-8 > > setenv LC_TIME de_DE.UTF-8 > > setenv LANG de_DE.UTF-8 > > > > Maybe this this can help with testing and inspiration. :-) > > In what file? Set those in /etc/csh.cshrc for global effect, or in your own ~/.cshrc for your user. Note that there's also a precedence of LC_ALL over the other LC_* settings, if I remember correctly. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
文章代碼(AID): #1JeG3lj4 (FB_questions)
文章代碼(AID): #1JeG3lj4 (FB_questions)