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 5.3k 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.
  • girishG girish

    @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 Offline
    imc67I Offline
    imc67
    translator
    wrote on last edited by
    #21

    @girish sorry for only sharing the end result of my search for a solution 😞 but indeed you’ve probably followed my path as well. Hope you can find the solution?

    girishG 1 Reply Last reply
    0
    • imc67I imc67

      @girish sorry for only sharing the end result of my search for a solution 😞 but indeed you’ve probably followed my path as well. Hope you can find the solution?

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

      @imc67 I have narrowed down the problem atleast. Something is making the whole locale system to not work in the image.

      
      <?php
      setlocale(LC_TIME, "C");
      echo strftime("%A");
      setlocale(LC_TIME, "fi_FI");
      echo strftime(" in Finnish is %A,");
      setlocale(LC_TIME, "fr_FR");
      echo strftime(" in French %A and");
      setlocale(LC_TIME, "de_DE");
      echo strftime(" in German %A.\n");
      ?>
      
      

      The above code simply doesn't translate anything and everything is in english. The code works let's say in https://www.codephponline.com/ correctly.

      I have to debug tomorrow as to why php is not detecting locale data properly.

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

        In the base image, the locale date is clearly there.. So, it's something PHP related.

        root@bc1f77223f4e:/# date
        Mi 10. Feb 08:53:44 UTC 2021
        root@bc1f77223f4e:/# export LC_ALL=fi_FI
        root@bc1f77223f4e:/# date
        ke 10.2.2021 08.54.01 +0000
        root@bc1f77223f4e:/# export LC_ALL=fr_FR
        root@bc1f77223f4e:/# date
        mer. 10 f�vr. 2021 08:54:10 UTC
        
        1 Reply Last reply
        3
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #24

          To make matters even more interesting, PHP CLI also works:

          # php index.php 
          Thursday in Finnish is torstai, in French jeudi and in German Donnerstag.
          

          So, it's something in mod-php .

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

            I found the answer deep deep deep deep in the internet! Wow, I cannot remember the last time I ventured into search result page 7 and actually found it useful 🙂

            https://bugs.mageia.org/show_bug.cgi?id=25411 is the issue which is reported against some rpm based distro. But effectively if modperl is installed, setlocale() in PHP does not work. Crazy! Uninstalling modperl module, does make it work.

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

              @imc67 Great success! Can you try the new package?

              756a516c-ebac-4349-bd3f-da7e61bcdbc8-image.png

              imc67I 1 Reply Last reply
              2
              • girishG girish

                @imc67 Great success! Can you try the new package?

                756a516c-ebac-4349-bd3f-da7e61bcdbc8-image.png

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

                @girish this is IT!! Wow you're the best!

                BTW: Moodle is really awesome too, we're going to use it for free e-learnings about art, history and culture in our community.

                jdaviescoatesJ robiR 2 Replies Last reply
                2
                • imc67I imc67

                  @girish this is IT!! Wow you're the best!

                  BTW: Moodle is really awesome too, we're going to use it for free e-learnings about art, history and culture in our community.

                  jdaviescoatesJ Offline
                  jdaviescoatesJ Offline
                  jdaviescoates
                  wrote on last edited by
                  #28

                  @imc67 @girish I love a happy ending 😄

                  I use Cloudron with Gandi & Hetzner

                  1 Reply Last reply
                  1
                  • imc67I imc67

                    @girish this is IT!! Wow you're the best!

                    BTW: Moodle is really awesome too, we're going to use it for free e-learnings about art, history and culture in our community.

                    robiR Offline
                    robiR Offline
                    robi
                    wrote on last edited by
                    #29

                    @imc67 I am still looking to see how awesome it is..

                    been buggy for me just trying to install a dark theme ;-/

                    Conscious tech

                    1 Reply Last reply
                    0
                    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