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

Re: ITA freedict

On Tue, Aug 26, 2003 at 06:48:07PM -0400, Bob Hilliard wrote:
> Petter Reinholdtsen <pere@hungry.com> writes:

> > If you set LOCPATH to the equivalent of /usr/lib/locale, and LC_ALL to
> > the name of the locale you generate, you should get what you want
> > without being root.  Something like this (mostly cut-n-paste from d-i
> > build system):

> >   # The variables
> >   LOCALE_PATH=/tmp/usr/lib/locale

> >   # Generating the locale
> >   mkdir -p $LOCALE_PATH
> >   localedef -i "$LOCALE_NAME.$LOCALE_CHARSET" -f "$LOCALE_CHARSET" \

> >   # Using the locale

> Steve Langasek <vorlon@netexpress.net> added:

> > Looks like this needs to be localedef -i "$LOCALE_NAME" -f "$LOCALE_CHARSET"
> > instead, but otherwise, I've confirmed that this works.

>      I need to use this locale as a command line argument to dictfmt
> --locale.  dictfmt calls this locale with setlocale(3).  I have tried
> --locale $(LOCALE_NAME).$(LOCALE_CHARSET) and --locale
> $(LOCPATH)/$(LOCALE_NAME).$(LOCALE_CHARSET).  Both return invalid
> locale, which is the error message dictfmt emits when it cannot open
> the specified locale file.  The locale _is_ generated in

>      Is the environment variable LOCPATH used by setlocale(3)?

>      Can anyone suggest what I need to try to make this work?

LOCPATH=/tmp/usr/lib/locale dictfmt --locale ($LOCALE_NAME).$(LOCALE_CHARSET)
ought to have the desired effect.  All locale-related glibc functions
should respect the value of LOCPATH.

Steve Langasek
postmodern programmer

Attachment: pgpsRAM4q3r2H.pgp
Description: PGP signature

Reply to: