Moodle

Calendar months not displayed in actual language

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.8.2
  • Fix Version/s: None
  • Component/s: Calendar, Language
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE

Description

Calendar months not displayed in actual language.
You can test it at my moodle test site http://rezeau.info/moodle (no need to login) by switching to various languages.
Calendar months correctly displayed for : English, Deutsch, French
Incorrectly displayed for Español, Português, Serbian language (both Latin and Cyrillic).
This looks like an old bug I reported back in 2004!
It may be related to recently reported bug MDL-11634
Joseph

Activity

Hide
Martin Dougiamas added a comment -

This uses locales on your operating system ... what is your setup?

Show
Martin Dougiamas added a comment - This uses locales on your operating system ... what is your setup?
Hide
Joseph Rézeau added a comment -

Hi Martin,

I still have no idea what "locales on your operating system" means. The wrong month calendar display is an old bug (see this post: http://moodle.org/mod/forum/discuss.php?d=31320#p149970) and I am surprised it has still not been resolved in Moodle.

In that same thread I asked what exactly is meant by "locale on your system" and my question has remained un-answered in more than 2 years...

Please, please, can you tell me once for all where exactly I should look for that infamous LOCALE setting. Is it somewhere in the Moodle files? In the Apache files?

And anyway I am surprised that the correct display of the MONTH name should depend on that parameter, when all other things are displayed according to the selected language.

Just one more thing, I find the explanation for the locale setting in Admin->language settings rather confusing:
------------------------------
Sitewide locale locale
Choose a sitewide locale - this will override the format and language of dates for all language packs (though names of days in calendar are not affected). You need to have this locale data installed on your operating system (eg for linux en_US.UTF-8 or es_ES.UTF-8). In most cases this field should be left blank.
----------------------------
What does "In most cases this field should be left blank." mean? Or rather, what are the cases where it should NOT be left blank?
Finally, on my test sites (and on my university site) the locale setting IS left blank.

I hope we can find a final answer to this language problem which has been plaguing us for so long...

Joseph
In fact, I find the reverse to be true

Show
Joseph Rézeau added a comment - Hi Martin, I still have no idea what "locales on your operating system" means. The wrong month calendar display is an old bug (see this post: http://moodle.org/mod/forum/discuss.php?d=31320#p149970) and I am surprised it has still not been resolved in Moodle. In that same thread I asked what exactly is meant by "locale on your system" and my question has remained un-answered in more than 2 years... Please, please, can you tell me once for all where exactly I should look for that infamous LOCALE setting. Is it somewhere in the Moodle files? In the Apache files? And anyway I am surprised that the correct display of the MONTH name should depend on that parameter, when all other things are displayed according to the selected language. Just one more thing, I find the explanation for the locale setting in Admin->language settings rather confusing: ------------------------------ Sitewide locale locale Choose a sitewide locale - this will override the format and language of dates for all language packs (though names of days in calendar are not affected). You need to have this locale data installed on your operating system (eg for linux en_US.UTF-8 or es_ES.UTF-8). In most cases this field should be left blank. ---------------------------- What does "In most cases this field should be left blank." mean? Or rather, what are the cases where it should NOT be left blank? Finally, on my test sites (and on my university site) the locale setting IS left blank. I hope we can find a final answer to this language problem which has been plaguing us for so long... Joseph In fact, I find the reverse to be true
Hide
Brian King added a comment -

I'd like to add some information. This is for a Moodle 1.9.2+ (Build: 20080917) running on a debian (virtual) server.

Only english month names were being displayed, regardless of language selected by user (Spanish, English, French, German, or Italian).

On the server, "locale -a" showed:
...
en_IN.utf8
de_CH.utf8
fr_CH.utf8
...

I did a "dpkg-reconfigure locales" and added the following locales:
de_DE.utf8
fr_FR.utf8
it_IT.utf8
es_ES.utf8

After restarting apache and disabling then re-enabling language text caching in Moodle (not sure if either or both of these was necessary), the month in the calendar was displayed correctly; i.e. October is Oktober if the user has selected Deutsch, octobre if the user has selected Francais, etc.

So it seems that the "default" country locale for a given language needs to be installed. Or the locale that matches the language pack that the user is currently using?

Brian

Show
Brian King added a comment - I'd like to add some information. This is for a Moodle 1.9.2+ (Build: 20080917) running on a debian (virtual) server. Only english month names were being displayed, regardless of language selected by user (Spanish, English, French, German, or Italian). On the server, "locale -a" showed: ... en_IN.utf8 de_CH.utf8 fr_CH.utf8 ... I did a "dpkg-reconfigure locales" and added the following locales: de_DE.utf8 fr_FR.utf8 it_IT.utf8 es_ES.utf8 After restarting apache and disabling then re-enabling language text caching in Moodle (not sure if either or both of these was necessary), the month in the calendar was displayed correctly; i.e. October is Oktober if the user has selected Deutsch, octobre if the user has selected Francais, etc. So it seems that the "default" country locale for a given language needs to be installed. Or the locale that matches the language pack that the user is currently using? Brian
Hide
Brian King added a comment -

Note that it is not clear for most of the Moodle language packs what locale needs to be installed on the server. Most of them are just the two letter language code (e.g. "de" for German). How would we know from that that we need to install the de_DE.utf8 locale?

Show
Brian King added a comment - Note that it is not clear for most of the Moodle language packs what locale needs to be installed on the server. Most of them are just the two letter language code (e.g. "de" for German). How would we know from that that we need to install the de_DE.utf8 locale?
Hide
Thierry Bagnoud added a comment -

For information : for Swiss French

Moodle 1.9.3+

Debian Etch

/etc/locale.gen = fr_CH.UTF-8 UTF-8

> locale -a

fr_CH.utf8

> dpkg-reconfigure locales -> add language pack fr_FR.utf8

> locale -a

fr_CH.utf8
fr_FR.utf8

restart Apache

and it's display date in french

Show
Thierry Bagnoud added a comment - For information : for Swiss French Moodle 1.9.3+ Debian Etch /etc/locale.gen = fr_CH.UTF-8 UTF-8 > locale -a fr_CH.utf8 > dpkg-reconfigure locales -> add language pack fr_FR.utf8 > locale -a fr_CH.utf8 fr_FR.utf8 restart Apache and it's display date in french
Hide
Kevin Mueller added a comment -

This is still valid, came across this issue with version 2.0.1

Show
Kevin Mueller added a comment - This is still valid, came across this issue with version 2.0.1

Dates

  • Created:
    Updated: