CALENDAR block shows month name in english regardless selected language

CALENDAR block shows month name in english regardless selected language

by José Mata -
Number of replies: 10

The header of CALENDAR block shows the month name in english regardless the selected language. My environment uses english, spanish, german and french and in all cases the month name appears in english.

I searched language packs customization, but I did not find any string I could customize.

However, it works fine on http://demo.moodle.net/

Any idea or advice to solve this minor issue ?

Average of ratings: -
In reply to José Mata

Re: CALENDAR block shows month name in english regardless selected language

by Germán Valero -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

This is explained in https://docs.moodle.org/28/en/Language_FAQ#I.27ve_set_a_default_site_language.2C_but_the_Moodle_calendar_is_in_English._Why.3F:

"If your Moodle calendar is not translated, then the string 'locale' (for *nix servers) or the string 'localewin' (for Windows servers) in the 'langconfig.php' file is wrong (or your server is not configured to support the language). There are quite a few languages that are not supported by Windows servers and the localewin server can not be set. In that case, you have to run your Moodle on a *nix server to make the translation of your Moodle calendar work. See dev:Translation_langconfig for details."

Average of ratings: Useful (2)
In reply to Germán Valero

Re: CALENDAR block shows month name in english regardless selected language

by José Mata -

I had to add the required locales.

In my linux server I executed the following commands:

cd /usr/share/locales

sudo ./install-language-pack es_MX.UTF-8

sudo ./install-language-pack de_DE.UTF-8

sudo ./install-language-pack fr_FR.UTF-8

sudo dpkg-reconfigure locales

sudo service apache2 reload

And that's it.


Average of ratings: Useful (1)
In reply to Germán Valero

Re: CALENDAR block shows month name in english regardless selected language

by Martin Greenaway -

For the avoidance of doubt, the "langconfig.php" file that needs to be edited is the one here: 

[moodledata]/lang/[languagecode] 

Doing a:

find . -name langconfig.php 

will give you a large number of irrelevant results!

In reply to Martin Greenaway

Re: CALENDAR block shows month name in english regardless selected language

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
If there is a problem in langconfig for this problem, please contact the language pack maintainer, since it concerns all users.


It's safer to edit language files throught the Moodle interface.

You need to reload the cache after changing language files.

Average of ratings: Useful (2)
In reply to koen roggemans

Re: CALENDAR block shows month name in english regardless selected language

by Martin Greenaway -

You can't edit the locale field through the Moodle UI (or, if you can, I've not seen where you can do this).

I totally agree that for language strings themselves, you should use the UI.

In reply to Martin Greenaway

Re: CALENDAR block shows month name in english regardless selected language

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators

Ah, that is more a feature then a problem then - I don't think there is ever a reason for changing the locale as a local language pack change.

If you find one that is wrong, contact the language pack maintainer or contact me.

In reply to koen roggemans

Re: CALENDAR block shows month name in english regardless selected language

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

For reference, this bug was opened recently (not related to locale installation): MDL-50364.

In reply to Nicolas Martignoni

Re: CALENDAR block shows month name in english regardless selected language

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators

Thanks Nicolas - I didn't see that one yet. I think it is not related, since the problem mentioned here is in the calendar block and that string comes from the operating system. 


In reply to koen roggemans

Re: CALENDAR block shows month name in english regardless selected language

by Nicolas Martignoni -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Yes Koen. I'm pretty sure it's not related (and mentioned it here just for reference).