Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Re: Japanese in Slackware (8.x or 9.0)



Scott Robbins wrote:

> Tim's excellent post gave me the answer. It turned out to be quite 
> simple. Changing LC_CTYPE to LC_ALL enabled me to do it in my usual
> fashion, with English menus and Japanese input.

If LC_ALL=ja_JP gives you English menus, something is quite borken...
LC_ALL=ja_JP means you override the LC_* values and treat them as if the
contained ja_JP instead. I'd discourage you from using LC_ALL,
especially if you really want english menus (LC_MESSAGES=en_US). :-)

You can use the locale command to look at the effective LANG and LC_*
values. I.e. in the following output:

LANG=en_US
LC_CTYPE=de_DE@example.com
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES=en_US
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=

LC_X=foo means LC_X is set to foo.
LC_X="foo" means LC_X is implicitly set to foo by either LANG or LC_ALL.

Maybe you should try if the following script works for you:

|#!/bin/sh
|
|CMD=$1
|shift
|
|all() {
|	eval $1 LC_ALL
|	eval $1 LANG
|	for i in CTYPE NUMERIC TIME COLLATE MONETARY MESSAGES PAPER NAME \
|	         ADDRESS TELEPHONE MEASUREMENT IDENTIFICATION; do
|		eval $1 "LC_$i"
|	done
|}
|
|all unset
|
|LANG=ja_JP
|LC_CTYPE=ja_JP
|LC_MESSAGES=en_US
|
|all export
|
|eval exec $CMD "$*"

You should start kinput2 and set XMODIFIERS in your X startup scripts,
but of course you could also add it to the above script.

> >         LC_ALL=ja_JP LANG=ja_JP /usr/X11R6/bin/kinput2 -canna &

You don't have to start kinput in a japanese locale, at least here
I have the following in my /etc/X11/xsession.d and it works just fine
even though it is started in LANG=en_US LC_CTYPE=de_DE@example.com .

/etc/X11/xsession.d/80xfree86-local_internationalization:

|kinput2="/usr/X11R6/bin/kinput2"
|
|if [ -x ${kinput2} ]
|then
|	${kinput2} -kinput -canna -xim &
|	XMODIFIERS="@example.com=kinput2"
|	export XMODIFIERS
|fi

-- 
Tobias								PGP: 0x9AC7E0BC
This mail is made of 100% recycled bits

Attachment: pgp00023.pgp
Description: PGP signature


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links