Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Moodle
  3. How to add "server" locales

How to add "server" locales

Scheduled Pinned Locked Moved Solved Moodle
localizationlocale
29 Posts 7 Posters 4.5k Views 7 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • imc67I Offline
      imc67I Offline
      imc67
      translator
      wrote on last edited by
      #1

      I installed Moodle, configured it for the Dutch (Nederlands) language it seems to work except things like days/months. There is also a warning in the Moodle GUI like: your server doesn't support English (en) or Dutch (nl).

      When I SSH into the server and command 'locale' it says:

      LANG=en_US.UTF-8
      LANGUAGE=
      LC_CTYPE="en_US.UTF-8"
      LC_NUMERIC="en_US.UTF-8"
      LC_TIME="en_US.UTF-8"
      LC_COLLATE="en_US.UTF-8"
      LC_MONETARY="en_US.UTF-8"
      LC_MESSAGES="en_US.UTF-8"
      LC_PAPER="en_US.UTF-8"
      LC_NAME="en_US.UTF-8"
      LC_ADDRESS="en_US.UTF-8"
      LC_TELEPHONE="en_US.UTF-8"
      LC_MEASUREMENT="en_US.UTF-8"
      LC_IDENTIFICATION="en_US.UTF-8"
      LC_ALL=
      

      What can I do to make nl_NL.UTF-8 available in the app (without changing the server wide language)?

      ? 1 Reply Last reply
      1
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #2
        This post is deleted!
        1 Reply Last reply
        0
        • imc67I imc67

          I installed Moodle, configured it for the Dutch (Nederlands) language it seems to work except things like days/months. There is also a warning in the Moodle GUI like: your server doesn't support English (en) or Dutch (nl).

          When I SSH into the server and command 'locale' it says:

          LANG=en_US.UTF-8
          LANGUAGE=
          LC_CTYPE="en_US.UTF-8"
          LC_NUMERIC="en_US.UTF-8"
          LC_TIME="en_US.UTF-8"
          LC_COLLATE="en_US.UTF-8"
          LC_MONETARY="en_US.UTF-8"
          LC_MESSAGES="en_US.UTF-8"
          LC_PAPER="en_US.UTF-8"
          LC_NAME="en_US.UTF-8"
          LC_ADDRESS="en_US.UTF-8"
          LC_TELEPHONE="en_US.UTF-8"
          LC_MEASUREMENT="en_US.UTF-8"
          LC_IDENTIFICATION="en_US.UTF-8"
          LC_ALL=
          

          What can I do to make nl_NL.UTF-8 available in the app (without changing the server wide language)?

          ? Offline
          ? Offline
          A Former User
          wrote on last edited by A Former User
          #3

          @imc67 Moodle documented this it seems: https://docs.moodle.org/310/en/Language_FAQ#I.27ve_set_a_default_site_language.2C_but_the_Moodle_calendar_is_in_English._Why.3F

          As for setting the locale in the container, this might help?: https://stackoverflow.com/questions/28405902/how-to-set-the-locale-inside-a-debian-ubuntu-docker-container

          Can't say I've tried.

          1 Reply Last reply
          3
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #4

            I haven't tried that myself, however you should not change the locale on the server as such. It will also have no effect on the app instance in question. You would have to change it inside the container and it looks like, that the app package needs some tweaking to support changing it in a persistent way as well as regenerating locale assets after changing.

            imc67I fbartelsF 2 Replies Last reply
            1
            • nebulonN nebulon

              I haven't tried that myself, however you should not change the locale on the server as such. It will also have no effect on the app instance in question. You would have to change it inside the container and it looks like, that the app package needs some tweaking to support changing it in a persistent way as well as regenerating locale assets after changing.

              imc67I Offline
              imc67I Offline
              imc67
              translator
              wrote on last edited by
              #5

              @nebulon indeed I've added the nl_NL.UTF-8 locale as an extra locale to the server (not the default!):

              sudo locale-gen nl_NL.UTF-8
              Generating locales (this might take a while)...
                nl_NL.UTF-8... done
              Generation complete.
              

              Restarted the app and same issue.

              Inside the app command line I did a locale -a and the result is:

              /app/code# locale -a
              C
              C.UTF-8
              POSIX
              
              1 Reply Last reply
              0
              • nebulonN nebulon

                I haven't tried that myself, however you should not change the locale on the server as such. It will also have no effect on the app instance in question. You would have to change it inside the container and it looks like, that the app package needs some tweaking to support changing it in a persistent way as well as regenerating locale assets after changing.

                fbartelsF Offline
                fbartelsF Offline
                fbartels
                App Dev
                wrote on last edited by
                #6

                @nebulon said in How to add "server" locales:

                You would have to change it inside the container and it looks like, that the app package needs some tweaking to support changing it

                Its probably easier to just define some focus languages and to add them directly into the base image. There are some other applications that also depend on system locales so it would imho make not much sense to have an individual locale selection in all apps.

                girishG 1 Reply Last reply
                3
                • fbartelsF fbartels

                  @nebulon said in How to add "server" locales:

                  You would have to change it inside the container and it looks like, that the app package needs some tweaking to support changing it

                  Its probably easier to just define some focus languages and to add them directly into the base image. There are some other applications that also depend on system locales so it would imho make not much sense to have an individual locale selection in all apps.

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #7

                  @fbartels said in How to add "server" locales:

                  Its probably easier to just define some focus languages and to add them directly into the base image

                  Yes, this is the approach I have taken with some of the packages where I just hardcoded the popular locales (and just add new ones if someone requests it).

                  imc67I 1 Reply Last reply
                  2
                  • girishG girish

                    @fbartels said in How to add "server" locales:

                    Its probably easier to just define some focus languages and to add them directly into the base image

                    Yes, this is the approach I have taken with some of the packages where I just hardcoded the popular locales (and just add new ones if someone requests it).

                    imc67I Offline
                    imc67I Offline
                    imc67
                    translator
                    wrote on last edited by
                    #8

                    @girish can you please add nl_NL.UTF-8 to this package?

                    1 Reply Last reply
                    1
                    • girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #9

                      We found that there is a locales-all package that magically has all the locales. Bloats the base image a bit but it benefits all apps.

                      @imc67 Just testing the new base image with a few apps, will publish moodle once we have the required 'confidence' with the new image.

                      imc67I 1 Reply Last reply
                      3
                      • girishG girish

                        We found that there is a locales-all package that magically has all the locales. Bloats the base image a bit but it benefits all apps.

                        @imc67 Just testing the new base image with a few apps, will publish moodle once we have the required 'confidence' with the new image.

                        imc67I Offline
                        imc67I Offline
                        imc67
                        translator
                        wrote on last edited by
                        #10

                        @girish GREAT! Thanks you.

                        girishG 1 Reply Last reply
                        0
                        • imc67I imc67

                          @girish GREAT! Thanks you.

                          girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote on last edited by
                          #11

                          @imc67 I updated the package, can you give it a try?

                          imc67I 1 Reply Last reply
                          0
                          • girishG girish

                            @imc67 I updated the package, can you give it a try?

                            imc67I Offline
                            imc67I Offline
                            imc67
                            translator
                            wrote on last edited by
                            #12

                            @girish it doesn’t work 😞

                            When I do a locale -a I indeed get a huge list with also nl_NL.UTF8

                            See the difference Moodle expects: nl_NL.UTF-8

                            Searched and searched but couldn’t find the right solution.

                            girishG 1 Reply Last reply
                            0
                            • imc67I imc67

                              @girish it doesn’t work 😞

                              When I do a locale -a I indeed get a huge list with also nl_NL.UTF8

                              See the difference Moodle expects: nl_NL.UTF-8

                              Searched and searched but couldn’t find the right solution.

                              girishG Offline
                              girishG Offline
                              girish
                              Staff
                              wrote on last edited by
                              #13

                              @imc67 How can I reproduce this? I installed dutch language pack and set the language in admin settings and it seems to work?

                              e0697d2f-c759-4e63-b060-0239660880e9-image.png

                              imc67I 1 Reply Last reply
                              0
                              • girishG girish

                                @imc67 How can I reproduce this? I installed dutch language pack and set the language in admin settings and it seems to work?

                                e0697d2f-c759-4e63-b060-0239660880e9-image.png

                                imc67I Offline
                                imc67I Offline
                                imc67
                                translator
                                wrote on last edited by
                                #14

                                @girish right but when you go to calendar/ Kalender then you see English words like February instead of februari

                                girishG 2 Replies Last reply
                                0
                                • imc67I imc67

                                  @girish right but when you go to calendar/ Kalender then you see English words like February instead of februari

                                  girishG Offline
                                  girishG Offline
                                  girish
                                  Staff
                                  wrote on last edited by
                                  #15

                                  @imc67 true, i see that but the days are in dutch. So, this is probably something in moodle and not locale related (unless you have some strong reason to believe so).

                                  1 Reply Last reply
                                  0
                                  • imc67I imc67

                                    @girish right but when you go to calendar/ Kalender then you see English words like February instead of februari

                                    girishG Offline
                                    girishG Offline
                                    girish
                                    Staff
                                    wrote on last edited by
                                    #16

                                    @imc67 Maybe this post - https://moodle.org/mod/forum/discuss.php?d=312709 . Which led me to this bug - https://tracker.moodle.org/browse/MDL-50364 (it's still not fixed)

                                    imc67I 2 Replies Last reply
                                    0
                                    • girishG girish

                                      @imc67 Maybe this post - https://moodle.org/mod/forum/discuss.php?d=312709 . Which led me to this bug - https://tracker.moodle.org/browse/MDL-50364 (it's still not fixed)

                                      imc67I Offline
                                      imc67I Offline
                                      imc67
                                      translator
                                      wrote on last edited by
                                      #17

                                      @girish in the Moodle forum every question regarding this issue seemed to be solved, so it doesn’t look like there is a Moodle issue:

                                      https://moodle.org/mod/forum/discuss.php?d=390750

                                      I tried some of the solutions but of course get stuck on the ReadOnly situation in the app.

                                      girishG 2 Replies Last reply
                                      0
                                      • girishG girish

                                        @imc67 Maybe this post - https://moodle.org/mod/forum/discuss.php?d=312709 . Which led me to this bug - https://tracker.moodle.org/browse/MDL-50364 (it's still not fixed)

                                        imc67I Offline
                                        imc67I Offline
                                        imc67
                                        translator
                                        wrote on last edited by
                                        #18

                                        @girish I see Bitnami solved this in their Docker container with this:

                                        https://github.com/bitnami/bitnami-docker-moodle/commit/16f468b9b78528df529c6314043d25a96b690d53

                                        It’s too technical for me but perhaps you can find out if this is also a solution for Cloudron?

                                        1 Reply Last reply
                                        0
                                        • imc67I imc67

                                          @girish in the Moodle forum every question regarding this issue seemed to be solved, so it doesn’t look like there is a Moodle issue:

                                          https://moodle.org/mod/forum/discuss.php?d=390750

                                          I tried some of the solutions but of course get stuck on the ReadOnly situation in the app.

                                          girishG Offline
                                          girishG Offline
                                          girish
                                          Staff
                                          wrote on last edited by
                                          #19

                                          @imc67 said in How to add "server" locales:

                                          @girish in the Moodle forum every question regarding this issue seemed to be solved, so it doesn’t look like there is a Moodle issue:

                                          Correct me if I am wrong but I think there are two separate issues we are talking about here. One is there being a warning about "Your server does not support the following languages" (also reported in the forum post you linked). This is the issue you initially had and in the latest base image this should be fixed. I tried installing some language package on moodle and I did not see that warning. Are you still seeing this warning?

                                          The second issue is calendar not being translated. I think this is a moodle issue. Atleast that's what https://tracker.moodle.org/browse/MDL-50364 is about. Do you have happen to have a bitnami install where you can check if the calendar is indeed translated. Also, to clarify, for me here only the month names are not translated. Everything else including day of the week is translated to dutch.

                                          1 Reply Last reply
                                          0
                                          • imc67I imc67

                                            @girish in the Moodle forum every question regarding this issue seemed to be solved, so it doesn’t look like there is a Moodle issue:

                                            https://moodle.org/mod/forum/discuss.php?d=390750

                                            I tried some of the solutions but of course get stuck on the ReadOnly situation in the app.

                                            girishG Offline
                                            girishG Offline
                                            girish
                                            Staff
                                            wrote on last edited by
                                            #20

                                            @imc67 OK, I found more info here

                                            https://github.com/bitnami/bitnami-docker-moodle/issues/120
                                            https://docs.moodle.org/dev/Translation_FAQ#The_month_names_and_days_are_displayed_in_English._How_can_I_translate_them.3F

                                            Those do point to some Cloudron package issue after all. Let me investigate.

                                            imc67I 1 Reply Last reply
                                            2
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes


                                              • Login

                                              • Don't have an account? Register

                                              • Login or register to search.
                                              • First post
                                                Last post
                                              0
                                              • Categories
                                              • Recent
                                              • Tags
                                              • Popular
                                              • Bookmarks
                                              • Search