I have a fresh installation of Debian 9 (stretch) on my machine and I've set locales through dpkg-reconfigure to a non-english language. Since I'm using KDE, I've also set this as the only language in the Preferred languages list in System Settings and I've installed the relative kde-l10n package through apt-get.

Now KDE-related programs are in the correct language, but all the others (Firefox, Thunderbird, Kaffeine, Telgram for example) keep displaying the relative interface texts in english. In particular in Firefox I've also noticed that the displayed dates use the UTC timezone instead of CET (which would be the correct one for my locale), and the French dictionary, which has nothing to do with my locale, was preinstalled for some reason.

env | grep LANG shows that the LANG and LANGUAGE env variables are correctly set to the desired language, while env | grep LC returns nothing (from what I've read LANG is just a fallback variable in case no LC_*s are found)

Why do programs not respect my locale and how can this be fixed?

  • 1
    Many big programs come with their own locale packages. Did you install them as well? – ctrl-d Jan 27 '19 at 19:41
  • As I just mentioned in a comment to @icarus' reply I did not install locale packages, but these, for the exact same packages, were not needed on my previous Ubuntu-based installations in order to have these programs displaying interface texts in my language. – RVKS Jan 27 '19 at 21:13
  • That's probably a good clarification, as your current question could easily be misinterpreted as you having already installed the language-specific versions of the packages. (as per ctrl-d's comment as well) – Jeff Schaller Jan 28 '19 at 12:51

Programs have to be written to respect the locale. For example if I write

 echo hello

and I run it with a french locale, I do not expect it to output bonjour

The timezone has nothing to do with the locale setting, English is spoken all over the world, but not all the world has the same time as London. Set the TZ variable to specify the timezone, e.g. TZ=PST8PDT or TZ=America/LosAngeles, for an individual program, or make /etc/localtime have the correct information to set it globally.

  • I'm obviously talking about programs which support mutiple languages like the ones I've mentioned. In my previous installations, mostly on Ubuntu-based distributions, these programs would automatically be displayed in the correct local language, set through the mentioned environment varaibles. Now, instead, on my current Debian installation the default language for all non-KDE programs is English despite the locales define a different default language. The same is valid for time zones. – RVKS Jan 27 '19 at 17:46
  • I am glad it is obvious to you that you are talking about programs that support multiple languages. Have you actually installed the french support for firefox, e.g. packages.debian.org/stretch/firefox-esr-l10n-fr ? – icarus Jan 27 '19 at 20:47
  • I did not install that package because I don't want any french language pack (that's not my language). The french thing I was mentioning in the OP is the dictionary, needed for spell checking: for some reason which I can't understand the Firefox package I installed from sid did include the french dictionary, which has nothing to do with my locale. In addition, in my previous, Ubuntu-based installations, Firefox and the other programs I'm mentioning automatically set my local language without the need to install any additional package other than dependencies. Could it be some apt setting? – RVKS Jan 27 '19 at 21:10
  • What locale do you actually want? Did you install the firefox package for that locale? – icarus Jan 27 '19 at 21:34
  • 1
    In Debian, less assumptions are made by the system, it's left up to the user to decide things, such as automatically also installing locales for a package you want to install. That's why it's not recommended for newbies. – ctrl-d Jan 27 '19 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.