Your server does not seem to fully support the following languages

Re: Your server does not seem to fully support the following languages

by Gareth J Barnard -
Number of replies: 3
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Thanks Sven,

Was trying to run PHP Unit on Ubuntu 20.04 and got:

Required locale 'en_AU.UTF-8' is not installed.

so:

sudo apt install language-pack-en
sudo service apache2 reload

worked for me.

Gareth


Average of ratings: Useful (2)
In reply to Gareth J Barnard

Re: Your server does not seem to fully support the following languages

by Benoit Maisonny -

I was surprised we'd have to actually install the Linux language pack on the server in order to support a language pack in Moodle. That is a few MB each and brings not just the locales but in fact a complete translation of Linux itself. It turns out it isn't necessary. Moodle only needs the locale definition, not the Linux language pack.

On a Ubuntu 20.04 system with nginx rather than Apache, I just do:

locale-gen fr_FR.UTF-8 en_GB.UTF-8
systemctl reload nginx
systemctl reload php7.4-fpm

locale-gen generates the locale information that Moodle needs. It takes a list of locales. Without any parameter, it will generate all locales for all installed Linux language packs. Available locales are listed in /usr/share/i18n/SUPPORTED. For example, the command "grep es_ /usr/share/i18n/SUPPORTED" lists all Spanish locales. There's a catch here: when adding a "parent" language pack in Moodle (e.g. es for international Spanish), one needs to install the main locale in Linux, named with a country code (e.g. "es_ES", from Spain). Likewise, "ar" in Moodle is "ar_SA" in Linux, "fr" is "fr_FR", and so on.

Because I'm using nginx and the PHP-nginx adapter, I need to reload both services.

Average of ratings: Useful (4)
In reply to Benoit Maisonny

Re: Your server does not seem to fully support the following languages

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Thank you Benoit for sharing this useful tip.

Just to clarify, I don't think there was any intention to suggest that installing these packages is mandatory. And if you are aware of a place that claims it, it shall be fixed. It's just one of the ways to get the thing done and for many administrator, the easiest one.

In reply to David Mudrák

Re: Your server does not seem to fully support the following languages

by Benoit Maisonny -
Indeed, I only saw the instruction in messages above. It makes sense when installing only 1 language besides English on the server, if the server administrator wants to see system messages in that language. I wanted to install multiple languages in Moodle only, without installing them on the Linux server as well.