Tag Info

Hot answers tagged

182

First run locale to list what locales currently defined for the current user account: $ locale LANG=C LANGUAGE= LC_CTYPE=fi_FI.UTF-8 LC_NUMERIC="C" LC_TIME="C" LC_COLLATE=fi_FI.UTF-8 LC_MONETARY="C" LC_MESSAGES=fi_FI.UTF-8 LC_PAPER="C" LC_NAME="C" LC_ADDRESS="C" LC_TELEPHONE="C" LC_MEASUREMENT="C" LC_IDENTIFICATION="C" LC_ALL= Then generate the missing ...


121

Nothing suggested above worked in my case (Ubuntu Server 12.04LTS). What finally helped was putting to the file /etc/environment: LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 For some reason it was missing. The outputs for locale and other commands appeared like the variables were properly defined. In other words don't take for granted all the basic stuff is ...


98

That's because your locale in your local machine is set to German, which SSH forwards to and tries to use on the server, but your server does not have it installed. You've got several options: Generate the locale. Generate the German locale on the server with sudo locale-gen de. Stop forwarding locale from the client. Do not forward the locale environment ...


95

check which locales are supported: locale -a add the locales you want (for example ru): sudo locale-gen ru_RU sudo locale-gen ru_RU.UTF-8


79

They should disappear after issuing: sudo locale-gen en_US en_US.UTF-8 sudo dpkg-reconfigure locales dpkg-reconfigure reconfigures packages after they have already been installed. Pass it the names of a package or packages to reconfigure. It will ask configuration questions, much like when the package was first installed.


48

I had the same problem, but found the following solution over at ubuntuforums: export LANGUAGE=en_US.UTF-8 export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 locale-gen en_US.UTF-8 sudo dpkg-reconfigure locales


38

Here's another solution, also from Ubuntu Forums. I think this is somewhat cleaner and more robust: it doesn't involve customising Ubuntu's locale files (only settings that you're supposed to edit). Gnome calendar applet adheres to your locale settings. In Ubuntu, you can assign locale components by editing the file /etc/default/locale. Here is ...


30

Just add the following to your .bashrc file (assuming you're using bash) export LC_ALL="en_US.UTF-8"


26

Type the following in terminal to get rid of that error, sudo apt-get install language-pack-en-base sudo dpkg-reconfigure locales


26

Usually this error means that you could have been changing between different languages (locales) and something has caused this to error erroneously. You could try regenerating your list of locales with sudo dpkg-reconfigure locales For me the result was: Generating locales... en_AG.UTF-8... done en_AU.UTF-8... done en_BW.UTF-8... done ...


23

Try the following commands sudo locale-gen fr_FR sudo update-locale LANG=fr_FR


22

check which locales are supported : less /usr/share/i18n/SUPPORTED Add locale to list of generated echo ru_RU.UTF8 >> /var/lib/locales/supported.d/local Regenerate list (it will invoke locale-gen...) sudo dpkg-reconfigure locales


20

I've managed to get things running "normally" again. After trying lots of package re-installs etc, including fully removing IBus (all to no effect), I started to think that it may be caused by a config setting which re-installing doesn't modify. I had noticed that the output from locale was rather bereft, of UTF-8 assignments, so I checked this in a ...


18

Run the command locale - it should show your current locale. Generate the locales for french: sudo locale-gen fr_FR sudo locale-gen fr_FR.UTF-8 Also, try regenerating the supported locale list by running: sudo dpkg-reconfigure locales And update/change the current default locale: sudo update-locale LANG=fr_FR.UTF-8 Update Extra steps to try: ...


18

This can happen sometimes on fresh minimal/alternate installs or in other situations. The fix is pretty simple. Try these, in the following order, testing after each to see if the situation is fixed: 1. Reconfigure locales sudo dpkg-reconfigure locales if that doesn't work, 2. Reinstall locale language-pack sudo apt-get --reinstall install ...


18

This is a common problem if you are connecting remotely, so the solution is to not forward your locale. Edit /etc/ssh/ssh_config and comment out SendEnv LANG LC_* line.


18

You can set locale manually using update-locale: sudo update-locale LANG=de_DE.UTF-8 LC_MESSAGES=POSIX Read the man page for more information. Alternatively, you can manually change your system's locale entries by modifying the file /etc/default/locale. For example on a German system, to prevent system messages from being translated, you may use: ...


17

Solution: Edit /etc/default/locale: LANG="en_US" LANGUAGE="en_US:en" Edit ~/.pam_environment: LANG=en_US Language=en_US Logout and Login or Reboot.


17

I would go another route, which is IMO better suited to the Ubuntu style. Use the packages provided. There are packages for each locale, and they do all the work for you... no need to edit /var files, which I always believed were not meant to be edited manually. sudo apt-get install language-pack-XX where XX stands for the language code. Installing a ...


17

The full list of key combinations is available on the local filesystem here: /usr/share/X11/locale/en_US.UTF-8/Compose Everything that starts with <Multi_key> is a Compose key combination. You'll find a lot of multi-number combinations producing stuff like: 34 as ¾ (10) as ⑩ And there are some fun (nearly easter egg) things in there too, ...


16

What worked for me on 12.10 was this: apt-get install language-pack-en-base This was after dpkg-reconfigure locales produced no results.


16

There is a command for that: sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 It updates /etc/default/locale with provided values.


14

What is an Ubuntu localized image? Due to space restrictions, the official Ubuntu installation CDs (also known as ISO images) that can be downloaded from ubuntu.com contain only a handful of the many languages in which Ubuntu is available. Any additional languages can then be downloaded during or after the installation. Localized images are customized ...


14

You can list locales with localedef --list-archive or with locale -a Corresponding file size is given by ls -lh /usr/lib/locale/locale-archive To remove unused locales you can do sudo locale-gen --purge it_IT.UTF-8 en_US.UTF-8 && echo Success! where it_IT.UTF-8 and en_US.UTF-8 are the only two locales I want. The && echo ...


13

This answer will demonstrate how to fully customize a locale, optionally using an existing locale as a base. The type of locale that will be used in this answer is the i18n type; such type of locale will be implied in every mention of the word "locale" in the body of the answer. Find a guide The first thing you need to customize a locale, is get to know ...


13

If LC_ALL is set it overrides the values of all the other LC_ variables. Hence setting it by default would have the same effect for your locale settings as setting all the LC variables but would make it more difficult to change only some of the values.


13

Edit /etc/default/locale: LANG="en_US" LANGUAGE="en_US:en" Edit ~/.pam_environment: LANG=en_US Language=en_US Log out and log in, or reboot.


12

I've found locale-gen to be your friend. as in (adding hebrew utf8 for example): root@world:~# locale-gen he_IL.UTF-8 you can even rehash it like so: root@world:~# dpkg-reconfigure locales and check that you did good: root@world:~# locale -a I found this solution way simpler than adding stuff to text files, even though it is what it does.


11

In my case, the problem was that /usr/share/initramfs-tools/hooks/root_locale is expecting to see individual locale directories in /usr/lib/locale but locale-gen is configured to generate an archive file by default. I fixed it by running: sudo locale-gen --purge --no-archive



Only top voted, non community-wiki answers of a minimum length are eligible