Language fallbacks for Scan­di­navian languages in Debian

During the installation of Debian, I chose Norwegian bokmål as my only preferred language. Debian, however, seems to think the three Scandinavian languages Danish, Norwegian, and Swedish are similar enough to use them as fallbacks for each other when translations are incomplete.

There’s no way to set the list of languages from the system installer or afterward from GNOME’s system settings program. So, how do you get rid of the unwanted languages?

Open the file /etc/default/locale for editing. Remove the language codes for the unwanted languages, in this example Danish and Swedish, from the LANGUAGES variable. It is a colon-separated string of language codes with the preferred language first (leftmost). When you are done editing it, it should look something like this: LANGUAGE="nb_NO:nb:no:en".

Run the locale-gen command to install translations for the desired languages and purge the unwanted ones. Afterward, newly opened programs will use the new languages. Log out and back in again to apply the change to all programs.

I’ve also removed Norwegian nynorsk (nn) from my own setup. However, as I’ve kept the Norwegian meta-language code (“no” includes both nb and nn), some nynorsk may still show up from time to time.

Note: If you want to add new languages instead of removing one, you must also uncomment them in the file /etc/locale.gen.