Adding locales on Ubuntu?

Erik Christiansen erik at dd.nec.com.au
Fri Jul 14 02:36:42 UTC 2006


On Thu, Jul 13, 2006 at 01:17:15PM +0100, Adam Funk wrote:
> On 2006-07-13, Nik <nik at cheddarcheese.de> wrote:
> 
> > Can't you use:
> >
> > locale-gen <locale>
> 
> I've tried that with partial success --- see below.  Any idea why the
> other three don't work, or how to force them to work?

Adam,

This is what I successfully used, the one time I needed to restore an
ISO-8859-1 based locale. (My personal record of the problem is shown
below, at "Debug:".

localedef -i en_AU -f ISO-8859-1 en_AU

Note:
          --help  # Lists options not in the manpage, and:

System's directory for character maps : /usr/share/i18n/charmaps
                       repertoire maps: /usr/share/i18n/repertoiremaps
                       locale path    : /usr/lib/locale:/usr/share/i18n

Also,
localedef --list-archive  # Same as "locale -a", but omitting C & POSIX.
                          # Probably probes /usr/lib/locale/locale-archive

Background:
      Locale choices: /usr/share/doc/locales/SUPPORTED   # Small diff re
                      /usr/share/i18n/SUPPORTED          # reference file.

   locale-gen -- generates localisation files, using /etc/locale.gen as a guide.
                 It may be manipulated via "dpkg-reconfigure locales",
                 or manually.

Debug: (null): can't set the locale; make sure $LC_* and $LANG are correct
Cause: An apt-get install of newsgate had clobbered locale. /etc/locale.gen
       listed only C, and locale  -a listed only C, POSIX.
Fix:   # localedef -i en_AU -f ISO-8859-1 en_AU
       Error message is gone, and locale  -a also lists en_AU & en_AU.iso88591.
       However, /etc/locale.gen is unchanged.

Despite having had neither time nor inclination to delve further into
such murk, once the problem was solved, it would be interesting to hear
how you fare.

Good luck,
Erik






More information about the ubuntu-users mailing list