When I accidentally deleted Localizations via BleachBit, in system settings I can't add another language. And this massage pop-up: "There are no additional languages available on this system." How can I fix this?
4 Answers
First run sudo dpkg-reconfigure locales
from the command line to adjust your locales setting.
Then open the Languages module from the System Settings.
There is an Add language button.
you can order multiple languages in order of preferences. if some translations strings are missing, it will automatically fallback to your next favorite.
you need to logout and log back in after adding languages

- 1,172
@Mathieu J. In /etc/default/locale
# File generated by update-locale
#LANG="en_US.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LANGUAGE="ru:en_US:en"
LANG="ru_RU.UTF-8"
From locale-gen
dgir@dgir-PC:~$ sudo locale-gen
[sudo] password for dgir:
Generating locales (this might take a while)...
en_AG.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_AU.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_AU': No such file or directory
done
en_BW.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_CA.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_CA': No such file or directory
done
en_DK.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_GB.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_HK.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_IE.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_IL.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_IN.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_NG.UTF-8...failed to set locale!
[error] cannot open locale definition file `da_DK': No such file or directory
done
en_NZ.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_PH.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_SG.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_US.ISO-8859-1...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_US.ISO-8859-15...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_US.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_ZA.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_ZM.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
en_ZW.UTF-8...failed to set locale!
[error] cannot open locale definition file `en_GB': No such file or directory
done
ru_RU.ISO-8859-5... done
ru_RU.CP1251... done
ru_RU.KOI8-R... done
ru_RU.UTF-8... done
ru_UA.UTF-8... done
Generation complete.
dgir@dgir-PC:~$

- 3
-
since you already have
en_US
in LANGUAGE, I would remote the trailing:en
at the end, maybe that will remove all the hits for missing definition foren_*
– Mathieu J. May 05 '20 at 23:36 -
the
da_DK
is weird, as it is the only non english and non russian locale listen. to me, it is a hint to look for another config file hitting at your bug. I wouldsudo grep -rn da_DK /etc
to find any references to that locale – Mathieu J. May 05 '20 at 23:36
So. I delete ALL errors messages like
aa_DJ.ISO-8859-1...[error] cannot open locale definition file `aa_DJ': No such file or directory
done
because there are too many of them and the entire log does not fit in one comment. I left only those that were without error, to my surprise there was no English on "locales", strange, but there are other languages and Russian, which is my main language. So I do not know what to do, this so so frustrating, losing my mind here.
dgir@dgir-PC:~$ sudo dpkg-reconfigure locales
[sudo] password for dgir:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:ru",
LC_ALL = (unset),
LC_ADDRESS = "ru_RU.UTF-8",
LC_NAME = "ru_RU.UTF-8",
LC_MONETARY = "ru_RU.UTF-8",
LC_PAPER = "ru_RU.UTF-8",
LC_IDENTIFICATION = "ru_RU.UTF-8",
LC_TELEPHONE = "ru_RU.UTF-8",
LC_MEASUREMENT = "ru_RU.UTF-8",
LC_TIME = "ru_RU.UTF-8",
LC_NUMERIC = "ru_RU.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
bem_ZM.UTF-8... done
ber_MA.UTF-8... done
cmn_TW.UTF-8... done
hak_TW.UTF-8... done
mfe_MU.UTF-8... done
niu_NU.UTF-8... done
niu_NZ.UTF-8... done
ru_RU.ISO-8859-5... done
ru_RU.CP1251... done
ru_RU.KOI8-R... done
ru_RU.UTF-8... done
ru_UA.KOI8-U... done
ru_UA.UTF-8... done
sah_RU.UTF-8... done
tpi_PG.UTF-8... done
unm_US.UTF-8... done
yuw_PG.UTF-8... done
Generation complete.
*** update-locale: Error: invalid locale settings: LANG=en_US.UTF-8 LC_NAME="ru_RU.UTF-8" LC_PAPER="ru_RU.UTF-8" LC_NUMERIC="ru_RU.UTF-8" LANGUAGE="ru:en_US:en" LC_TELEPHONE="ru_RU.UTF-8" LC_MONETARY="ru_RU.UTF-8" LC_ADDRESS="ru_RU.UTF-8" LC_IDENTIFICATION="ru_RU.UTF-8" LC_MEASUREMENT="ru_RU.UTF-8" LC_TIME="ru_RU.UTF-8"
dgir@dgir-PC:~$

- 3
-
Actually, the error is the hint to your resolution... I found this https://unix.stackexchange.com/questions/299536/locale-error-cannot-open-locale-definition-file-fa-ir#299547 I have a feeling it will solve your problem – Mathieu J. May 08 '20 at 02:30
if you get this error.
aa_DJ.ISO-8859-1...[error] cannot open locale definition file
aa_DJ': No such file or directory`
when running locale-gen
checkout this related answer
sudo apt-get purge locales
sudo apt-get purge language-pack-fa
sudo apt-get install locales
sudo apt-get install language-pack-fa

- 1,172
/etc/default/locale
contains, and runlocale-gen
after configuring it ? see: https://askubuntu.com/questions/76013/how-do-i-add-locale-to-ubuntu-server – Mathieu J. Apr 29 '20 at 22:06dpkg -S /usr/share/locale/ja/LC_MESSAGES/konsole.mo == konsole
– Mathieu J. Apr 29 '20 at 22:15sudo dpkg-reconfigure locales
? – Mathieu J. May 05 '20 at 23:33sudo dpkg-reconfigure locales anwser below
I run
sudo grep -rn da_DK /etc
This what I get:
– Dgir May 06 '20 at 08:48dgir@dgir-PC:~$ sudo grep -rn da_DK /etc [sudo] password for dgir: /etc/locale.alias:42:danish da_DK.ISO-8859-1 /etc/locale.alias:43:dansk da_DK.ISO-8859-1