Calendar and date in english instead of czech language

Calendar and date in english instead of czech language

by Lukáš Langer -
Number of replies: 4

Hello, I would like to ask for help with the language pack. If moodle is running on Windows Server 2019 or Windows Server 2022, the installed language pack works incorrectly and throws an error message see screenshot.

This error mainly occurs with calendars with dates in the wrong language.

We have the same problem at least on four customers  servers.
We use the same server settings as on  win servers 2016 and lower versions but it doesnt work.

Czech language installed.

The string 'localewin' in langconfig.php is correct:  $string['localewin'] = 'Czech_Czech Republic.1250';

This topic was allready solved here : Moodle in English: Calendar and date in wrong language but it doesnt work for win server 2019

Please can you help with this problem?

Average of ratings: -
In reply to Lukáš Langer

Re: Calendar and date in english instead of czech language

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hu Lukáš,

For performance and stability reasons, I usually work with Linux where you would simply install additional locales in the operating system in order to support multiple languages.

Based on my experience of installing Windows 11, I suspect the following instructions for Windows Server 2019 might help as the screenshots look similar.

https://www.dell.com/support/kbdoc/en-ca/000111205/how-to-localize-a-language-on-windows-server-2019

Keep in mind that I have not tried it myself so I am just guessing here.

Hope you find it helpful.

Best regards,

Michael Milette
Average of ratings: Useful (2)
In reply to Lukáš Langer

Re: Calendar and date in english instead of czech 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
Hi Lucas,
I' afraid I can only add to the guess work here, since also using Linux.
What I wanted to point out it that the discussion you mentioned is for Linux servers.

I think your best bet is to search help with Microsoft to figure out why Czech_Czech Republic.1250 is not supported anymore (is it available on your server?) and what should be used in stead. It would be very nice if you could post the solution here so it can be added to the documentation.
Average of ratings: Useful (2)
In reply to Lukáš Langer

Re: Calendar and date in english instead of czech language

by Lukáš Langer -
Hello everyone, after some time we managed to solve the problem.

For the Czech language, the solution is this:

Edit the langconfig.php file in moodledata\lang\cs\, set localewin = 'Czech', but do not update the language packs in Moodle, just purge cache.
Windows server does not support language package czech_Czech Republic.1250 and therefore we have to override it manually in the langconfig file.
After updating the language pack, czech_Czech Republic.1250 is inserted again into the locale win item.
But be careful, we can no longer update the language package in moodle because moodle rewrites the file to czech_Czech Republic.1250.

I hope this method will help someone.


Best regards,

Lukáš Langer
Average of ratings: Useful (2)
In reply to Lukáš Langer

Re: Calendar and date in english instead of czech language

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Lukáš,

Thanks for sharing your findings. However, instead of editing the string manually and disabling language pack updates, use the Moodle language editor in Site Administration to customize the string.

That way, the string won't be overwritten with language pack updates.

Hope you find this useful.

Best regards,

Michael Milette
Average of ratings: Useful (4)