When upgrading from Ubuntu 8.04 with German locale to 10.04 LTS, you might encounter a situation where most system messages appear in English but critical components like apt-get
stubbornly remain in the original language. This creates functional issues like swapped confirmation prompts (J/N instead of Y/N).
Here's the definitive solution to achieve full English localization:
# First, generate the en_US locale if not present
sudo locale-gen en_US.UTF-8
# Verify available locales
locale -a | grep en_US
# Edit the main locale configuration
sudo nano /etc/default/locale
Set these contents in /etc/default/locale
:
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"
LC_ALL="en_US.UTF-8"
APT maintains its own configuration. Create or modify:
sudo nano /etc/apt/apt.conf.d/99translations
Add this line to force English:
Acquire::Languages "none";
Update /etc/environment
with:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"
Run these commands to apply changes:
sudo dpkg-reconfigure locales
sudo update-locale LANG=en_US.UTF-8
sudo update-locale LANGUAGE=en_US:en
Reboot the server to ensure all services pick up the new settings:
sudo reboot
After reboot, verify with:
locale
# Should show en_US.UTF-8 for all categories
If any service still shows German output, check its specific configuration files for locale overrides.
After upgrading from Ubuntu 8.04 (German) to 10.04 LTS, you might notice that while most system messages appear in English, some core utilities like apt-get
still display output in German. This happens because locale settings are stored in multiple configuration files.
There are three main files controlling locale settings:
/etc/default/locale
/etc/environment
/var/lib/locales/supported.d/local
Here's the proper way to change the system locale completely:
# First, install English locale packages
sudo apt-get install language-pack-en-base
# Generate the new locale
sudo locale-gen en_US.UTF-8
# Update the default locale configuration
sudo update-locale LANG=en_US.UTF-8 LANGUAGE=en_US:en
# Alternatively, you can edit /etc/default/locale directly:
sudo nano /etc/default/locale
Set the content to:
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"
LC_ALL="en_US.UTF-8"
After making these changes, log out and log back in, then verify with:
locale
You should see output like:
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
If some messages still appear in German, try:
sudo dpkg-reconfigure locales
Select en_US.UTF-8
as the default locale during the configuration.
For a more thorough solution, you can:
# Remove all existing locale settings
sudo apt-get purge locales
# Reinstall locales package
sudo apt-get install locales
# Generate only the English locale
sudo locale-gen en_US.UTF-8
# Set as system default
sudo update-locale LANG=en_US.UTF-8
- Changes won't take effect until you log out and log back in
- Some services may need to be restarted
- Check individual application settings if they maintain their own locale preferences