Your server does not seem to fully support the following languages

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

Gareth J Barnard - келді
Number of replies: 3
Core developers қатысушының суреті Particularly helpful Moodlers қатысушының суреті 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


In reply to Gareth J Barnard

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

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.

In reply to Benoit Maisonny

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

David Mudrák - келді
Core developers қатысушының суреті Documentation writers қатысушының суреті Moodle HQ қатысушының суреті Particularly helpful Moodlers қатысушының суреті Peer reviewers қатысушының суреті Plugin developers қатысушының суреті Plugins guardians қатысушының суреті Testers қатысушының суреті 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

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.