Debian 9: How to set English language with German Locale

debianlanguagelinuxlocale

I want to use English language with German locale settings.


Right now my system runs with the following setup (configured during installation procedure in Debian Expert Installer):

  • Language: English - English (Default)
  • Country, territory or area: other -> Europe -> Austria
  • Country to base default locale settings on: United States - en_US.UTF-8
  • Keyboard: German

My question now is:

How can I preserve English language but switch the current locale (United States - en_US.UTF-8) to desired German locale (de_DE.UTF-8)?

During installation procedure this was not possible because an error occurred ("Invalid language/locale settings combination detected").

Best Answer

en_DE doesn’t exist as a default locale, so you can’t select English localised for German-speaking countries as a locale during installation. (Why should one use update-locale instead of directly setting LANGUAGE? describes the checks involved in choosing a locale.)

There are two approaches to achieve what you’re after.

  1. One is to create a new locale with your settings; see How to (easily) be able to use a new en_** locale? for details.
  2. The other is to set up your locale settings in a finer-grained fashion, using the various LC_ variables; for example:

    export LANG=en_US.UTF-8
    export LC_MONETARY=de_DE.UTF-8
    export LC_TIME=de_DE.UTF-8
    

    or, if you want German to be the default except for messages:

    export LANG=de_DE.UTF-8
    export LC_MESSAGES=en_US.UTF-8
    

    (and unset any other conflicting LC_ variables, in particular LC_ALL which overrides all other settings). You can check your settings using the locale program; see How does the "locale" program work? for details.

Related Question