Discussion:
Adding locales on Ubuntu?
Adam Funk
2006-07-12 10:24:34 UTC
Permalink
(Sorry, this is one of those "I know how to do X on Debian, but how do
I do it on Ubuntu?" questions.)

The output of `locale -a` include C, POSIX and a number of locales
ending in utf8. I need to have a few iso88591 locales as well, for
viewing and manipulating text files in Latin-1.

On Debian, I do this by adding them to /etc/locale.gen and run
locale-gen (as root). My Ubuntu machine doesn't have this file and
/etc/belocs/locale-gen.conf looks quite different.

How do I add more locales on Ubuntu?

Thanks,
Adam
Florian Diesch
2006-07-12 17:23:44 UTC
Permalink
Post by Adam Funk
The output of `locale -a` include C, POSIX and a number of locales
ending in utf8. I need to have a few iso88591 locales as well, for
viewing and manipulating text files in Latin-1.
On Debian, I do this by adding them to /etc/locale.gen and run
locale-gen (as root). My Ubuntu machine doesn't have this file and
/etc/belocs/locale-gen.conf looks quite different.
sudo locale-gen en_GB.ISO-8859-15 (or whatever locales you want)

You can edit /var/lib/locales/supported.d/* manualy too.



Florian
--
<http://www.florian-diesch.de/>
Adam Funk
2006-07-13 10:30:43 UTC
Permalink
Post by Florian Diesch
Post by Adam Funk
The output of `locale -a` include C, POSIX and a number of locales
ending in utf8. I need to have a few iso88591 locales as well, for
viewing and manipulating text files in Latin-1.
On Debian, I do this by adding them to /etc/locale.gen and run
locale-gen (as root). My Ubuntu machine doesn't have this file and
/etc/belocs/locale-gen.conf looks quite different.
sudo locale-gen en_GB.ISO-8859-15 (or whatever locales you want)
That particular combination works, but not some others (see below),
even though both of these files
/usr/share/i18n/charmaps/ISO-8859-15.gz
/usr/share/i18n/charmaps/ISO-8859-1.gz
exist. How can I find out what combinations are allowed, or force it
to allow French with Latin-1?

Thanks,
Adam


# locale-gen en_GB.ISO-8859-1
Error: 'en_GB.ISO-8859-1' is not a supported language or locale

# locale-gen en_GB.ISO-8859-15
Generating locales...
en_GB.ISO-8859-15... done
Generation complete.

# locale -a
C
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.iso885915
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8
fr_BE.utf8
fr_CA.utf8
fr_CH.utf8
fr_FR.utf8
fr_LU.utf8
POSIX
ro_RO.utf8

# locale-gen fr_FR.ISO-8859-1
Error: 'fr_FR.ISO-8859-1' is not a supported language or locale

# locale-gen fr_FR.ISO-8859-15
Error: 'fr_FR.ISO-8859-15' is not a supported language or locale
Florian Diesch
2006-07-13 16:40:44 UTC
Permalink
Post by Adam Funk
Post by Florian Diesch
Post by Adam Funk
The output of `locale -a` include C, POSIX and a number of locales
ending in utf8. I need to have a few iso88591 locales as well, for
viewing and manipulating text files in Latin-1.
On Debian, I do this by adding them to /etc/locale.gen and run
locale-gen (as root). My Ubuntu machine doesn't have this file and
/etc/belocs/locale-gen.conf looks quite different.
sudo locale-gen en_GB.ISO-8859-15 (or whatever locales you want)
That particular combination works, but not some others (see below),
/usr/share/i18n/SUPPORTED lists all supported locales


Florian
--
<http://www.florian-diesch.de/>
Adam Funk
2006-07-17 12:42:41 UTC
Permalink
Post by Florian Diesch
Post by Adam Funk
Post by Florian Diesch
sudo locale-gen en_GB.ISO-8859-15 (or whatever locales you want)
That particular combination works, but not some others (see below),
/usr/share/i18n/SUPPORTED lists all supported locales
That doesn't work on my computer!

/usr/share/i18n # grep fr_FR SUPPORTED
fr_FR.UTF-8 UTF-8
fr_FR ISO-8859-1
fr_FR at euro ISO-8859-15

/usr/share/i18n # locale-gen fr_FR.ISO-8859-1
Error: 'fr_FR.ISO-8859-1' is not a supported language or locale

/usr/share/i18n # locale-gen fr_FR.ISO-8859-15
Error: 'fr_FR.ISO-8859-15' is not a supported language or locale

/usr/share/i18n # locale-gen fr_FR at euro.ISO-8859-15
Error: 'fr_FR at euro.ISO-8859-15' is not a supported language or locale
Florian Diesch
2006-07-20 13:03:10 UTC
Permalink
Post by Adam Funk
Post by Florian Diesch
Post by Adam Funk
Post by Florian Diesch
sudo locale-gen en_GB.ISO-8859-15 (or whatever locales you want)
That particular combination works, but not some others (see below),
/usr/share/i18n/SUPPORTED lists all supported locales
That doesn't work on my computer!
/usr/share/i18n # grep fr_FR SUPPORTED
fr_FR.UTF-8 UTF-8
fr_FR ISO-8859-1
fr_FR at euro ISO-8859-15
/usr/share/i18n # locale-gen fr_FR.ISO-8859-1
Error: 'fr_FR.ISO-8859-1' is not a supported language or locale
/usr/share/i18n # locale-gen fr_FR.ISO-8859-15
Error: 'fr_FR.ISO-8859-15' is not a supported language or locale
/usr/share/i18n # locale-gen fr_FR at euro.ISO-8859-15
Error: 'fr_FR at euro.ISO-8859-15' is not a supported language or locale
Look closer. There's only "fr_FR.UTF-8", "fr_FR" and "fr_FR at euro" (followed by
a space and the charset used with this locale)




Florian
--
<http://www.florian-diesch.de/>
mwray
2006-07-22 06:22:32 UTC
Permalink
](*,) I have tried many of the steps above. I am trying to use
set-m17n-env to set my environment variables so I can use scim and
smartpinyin with skim (kde).



When I run set-m17n-env, it tells me that en_US.UTF-8 is missing, asks
to regen the locales, which it does (I have even tried setting
purge=YES in belocs) it regens ALL the locales, and en_US.UTF-8 is
listed amongst them, but then set-m17n-env tells me that all my UTF-8
environments are missing, would I like to regen again? If I say yes, it
just repeats itself, if I say no, it lets me select options, but
anything attempting to use the locale en_US.UTF-8 complains that it is
missing, defaulting back to locale "C". (I had a simialr issue in
breezy badger which was fixed by switching from the generic locales
package to belocs, this time the error persisted.
--
mwray
LKRaider
2006-07-24 22:07:22 UTC
Permalink
Post by Adam Funk
On 2006-07-13, Florian Diesch <diesch (AT) spamfence (DOT) net>
Post by Florian Diesch
Post by Adam Funk
Post by Florian Diesch
sudo locale-gen en_GB.ISO-8859-15 (or whatever locales you
want)
Post by Florian Diesch
Post by Adam Funk
That particular combination works, but not some others (see
below),
Post by Florian Diesch
/usr/share/i18n/SUPPORTED lists all supported locales
That doesn't work on my computer!
/usr/share/i18n # grep fr_FR SUPPORTED
fr_FR.UTF-8 UTF-8
fr_FR ISO-8859-1
fr_FR at euro ISO-8859-15
/usr/share/i18n # locale-gen fr_FR.ISO-8859-1
Error: 'fr_FR.ISO-8859-1' is not a supported language or locale
/usr/share/i18n # locale-gen fr_FR.ISO-8859-15
Error: 'fr_FR.ISO-8859-15' is not a supported language or locale
/usr/share/i18n # locale-gen fr_FR (AT) euro (DOT) ISO-8859-15
Error: 'fr_FR (AT) euro (DOT) ISO-8859-15' is not a supported
language or locale
Look closer. There's only "fr_FR.UTF-8", "fr_FR" and "fr_FR at euro" (followed by
a space and the charset used with this locale)
Florian
--
<http://www.florian-diesch.de/>
--
ubuntu-users mailing list
ubuntu-users (AT) lists (DOT) ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Try -> * locale-gen fr_FR *

It should generate the ISO locale.
--
LKRaider
Paul Puschmann
2006-07-13 07:26:52 UTC
Permalink
Post by Adam Funk
(Sorry, this is one of those "I know how to do X on Debian, but how do
I do it on Ubuntu?" questions.)
The output of `locale -a` include C, POSIX and a number of locales
ending in utf8. I need to have a few iso88591 locales as well, for
viewing and manipulating text files in Latin-1.
On Debian, I do this by adding them to /etc/locale.gen and run
locale-gen (as root). My Ubuntu machine doesn't have this file and
/etc/belocs/locale-gen.conf looks quite different.
How do I add more locales on Ubuntu?
sudo dpkg-reconfigure locales
--
: Please answer below the quote, use a realname and
: use plain-text (no HTML).
: Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060713/9d8f5de1/attachment.pgp>
Adam Funk
2006-07-13 10:26:39 UTC
Permalink
Post by Paul Puschmann
Post by Adam Funk
How do I add more locales on Ubuntu?
sudo dpkg-reconfigure locales
That just regenerated the same ones without giving me the opportunity
to select more.
Nik
2006-07-13 10:40:44 UTC
Permalink
In article <vnjho3-sci.ln1 at news.ducksburg.com>,
Post by Adam Funk
Post by Paul Puschmann
Post by Adam Funk
How do I add more locales on Ubuntu?
sudo dpkg-reconfigure locales
That just regenerated the same ones without giving me the opportunity
to select more.
Can't you use:

locale-gen <locale>

Nik
Adam Funk
2006-07-13 12:17:15 UTC
Permalink
Post by Nik
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?

Thanks,
Adam


# locale-gen en_GB.ISO-8859-1
Error: 'en_GB.ISO-8859-1' is not a supported language or locale

# locale-gen en_GB.ISO-8859-15
Generating locales...
en_GB.ISO-8859-15... done
Generation complete.

# locale -a
C
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.iso885915
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8
fr_BE.utf8
fr_CA.utf8
fr_CH.utf8
fr_FR.utf8
fr_LU.utf8
POSIX
ro_RO.utf8

# locale-gen fr_FR.ISO-8859-1
Error: 'fr_FR.ISO-8859-1' is not a supported language or locale

# locale-gen fr_FR.ISO-8859-15
Error: 'fr_FR.ISO-8859-15' is not a supported language or locale
Erik Christiansen
2006-07-14 02:36:42 UTC
Permalink
Post by Adam Funk
Post by Nik
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
Adam Funk
2006-07-17 12:46:45 UTC
Permalink
Post by Erik Christiansen
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
...
Post by Erik Christiansen
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.
That works (see below) --- thanks very much!


/usr/share/i18n # localedef -i fr_FR -f ISO-8859-1 fr_FR.iso88591

/usr/share/i18n # locale -a
C
...
fr_FR.iso88591
fr_FR.utf8
...
Paul Puschmann
2006-07-13 11:03:28 UTC
Permalink
Post by Adam Funk
Post by Paul Puschmann
Post by Adam Funk
How do I add more locales on Ubuntu?
sudo dpkg-reconfigure locales
That just regenerated the same ones without giving me the opportunity
to select more.
Okay, the do a sudo dpkg-reconfigure debconf and set it to 'medium'.

This is what I did on my Debian Etch-machine and it should be simmilar
on Ubuntu (that I used for 2 weeks).

Paul
--
: Please answer below the quote, use a realname and
: use plain-text (no HTML).
: Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060713/ee850077/attachment.pgp>
Loïc Martin
2006-07-13 11:20:59 UTC
Permalink
Have you tried (provided you use Dapper) System>Administration>Language
support?

Lo?c

(sorry for not quoting. Thunderbird don't send messages through gmail if
I quote today... :) )
Adam Funk
2006-07-13 12:45:05 UTC
Permalink
Post by Paul Puschmann
Post by Adam Funk
Post by Paul Puschmann
Post by Adam Funk
How do I add more locales on Ubuntu?
sudo dpkg-reconfigure locales
That just regenerated the same ones without giving me the opportunity
to select more.
Okay, the do a sudo dpkg-reconfigure debconf and set it to 'medium'.
I tried that, and then tried setting debconf to "low". Both times
"dpkg-reconfigure locales" failed to offer me any choices; it just
regenerated the existing ones (but it retained the one I added
manually earlier).
Gunnar Salbeck
2006-07-13 21:42:01 UTC
Permalink
Post by Adam Funk
Post by Paul Puschmann
Post by Adam Funk
How do I add more locales on Ubuntu?
sudo dpkg-reconfigure locales
That just regenerated the same ones without giving me the opportunity
to select more.
for adding a locale go to /var/lib/locales/supported.d/ and edit the
file "en".


Maybe someone of the ubuntu staff could tell me why
a "dpkg-reconfigure locales" does not work in Dapper.



regards

gs


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060713/d132ad92/attachment.pgp>
Loading...