Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Language Loginscreen

    Kopano WebApp
    5
    12
    999
    Loading More Posts
    • 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.
    • tommi
      tommi last edited by tommi

      Hello,

      maybe there is a bug in the webapp.
      The login screen is stil in English.

      My system Debian 9 (Stretch)
      Last Kopano community version
      Webapp 3.4.21.1699 + 964-Debian_9.0-all

      /etc/default/locale

      LANG="de_DE.UTF-8"
      

      locale:

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

      /etc/apache2/envvars

      . /etc/default/locale
      export LANG
      

      PHP test:

      var_dump($_SERVER);
      
       ["LANG"]=>
        string(11) "de_DE.UTF-8"
      

      /etc/default/kopano:

      KOPANO_LOCALE="de_DE.utf8"                                                                                                        
      KOPANO_USERSCRIPT_LOCALE="de_DE.utf8" 
      

      I testet set manualy in webapp config.php

      $_ENV["LANG"] = "de_DE";          
      

      Is there a posibility to check if $_ENV[“LANG”] corectly set?

      Greets
      Thomas

      1 Reply Last reply Reply Quote 0
      • jengelh
        jengelh Banned last edited by jengelh

        As with any website, I expect it to honor the language preference list as sent by the browser (“Accept-Language:”), not any system setting.

        1 Reply Last reply Reply Quote 0
        • tommi
          tommi last edited by

          Hi,

          yes, but german is the first language set in browser preference.

          1 Reply Last reply Reply Quote 0
          • AnotherAndy
            AnotherAndy last edited by

            hi tommi,
            I thought to have the same issue. After Upgrading to 3.4.20.1690+74.1 my welcome screen suddenly was english.
            But after restarting Kopano-server - now its german again.
            Have you tried a simple restart?

            1 Reply Last reply Reply Quote 0
            • tommi
              tommi last edited by

              Hi,

              yes I restarted Kopano and apache.

              1 Reply Last reply Reply Quote 0
              • marty
                marty Kopano (Inactive) last edited by

                As a workaround you can set the fallback language to German:
                https://documentation.kopano.io/webapp_admin_manual/config.html#default-language-and-fallback-language

                https://documentation.kopano.io/deskapp_admin_manual
                http://documentation.kopano.io/webapp_smime_manual
                https://documentation.kopano.io/webapp_admin_manual

                1 Reply Last reply Reply Quote 0
                • tommi
                  tommi last edited by

                  Hi marty,

                  yes I know but I like to figure out why webapp behave like this. maybe i have overseen something or there is really a bug.
                  It is not so annoying because after login the language is correct.

                  1 Reply Last reply Reply Quote 0
                  • Sinux
                    Sinux last edited by Sinux

                    Hi tommi,

                    I have the same problem for a long time already
                    it concerns checks the initialization of the language before the login, after the login it’s ok.
                    The error in apache log give this out

                    Unknown language: ‘de_DE’, referer: https://xxx.xxx/webapp/

                    no matter what I adjust in the config.php it always comes the same error (en_GB etc …)
                    this is a mistake but apparently does not demand so much attention;)

                    thanks

                    1 Reply Last reply Reply Quote 0
                    • marty
                      marty Kopano (Inactive) last edited by marty

                      @Sinux

                      I think it’s a bug in WebApp. I see a difference in the cookie and the language set by the admin.

                      On a test server could you change the line above
                      https://stash.kopano.io/projects/KW/repos/kopano-webapp/browse/index.php#87

                      and add
                      $lang = $Language->resolveLanguage($lang);

                      It should then look like

                      // Get language from the cookie, or from the language that is set by the admin
                                      $Language = new Language();
                                      $lang = isset($_COOKIE['lang']) ? $_COOKIE['lang'] : LANG;
                                      $lang = $Language->resolveLanguage($lang);
                                      $Language->setLanguage($lang);
                      

                      Let me know if this works

                      https://documentation.kopano.io/deskapp_admin_manual
                      http://documentation.kopano.io/webapp_smime_manual
                      https://documentation.kopano.io/webapp_admin_manual

                      Sinux 1 Reply Last reply Reply Quote 0
                      • Sinux
                        Sinux @marty last edited by Sinux

                        thanks @marty

                        I made this adjustment in the webapp config.php

                        <------>// Location to the translations
                        <------>define(“LANGUAGE_DIR”, “server/language/”);

                        <------>// Defines the default interface language. This can be overridden by the user.
                        <------>if (isset($_ENV[‘LANG’]) && $_ENV[‘LANG’]!=“C”){
                        <------><------>define(‘LANG’, $_ENV[“LANG”]); // This means the server environment language determines the web client language.
                        <------>}else{
                        <------><------>define(‘LANG’, ‘de_DE’); // default fallback language
                        <------>}
                        and your entry in the index.php and it works now finally (after all the years;) thank you very much!!!
                        Can I safely set this up in my productive environment?

                        thanks!!!

                        1 Reply Last reply Reply Quote 0
                        • marty
                          marty Kopano (Inactive) last edited by

                          Hi @Sinux ,

                          I commited the index.php fix in webapp master (https://stash.kopano.io/projects/KW/repos/kopano-webapp/commits/6e8dcb5ecd5db270615dc2d6ae4c57158c7ddfa4)

                          It will end up in the 3.5.3 release.

                          https://documentation.kopano.io/deskapp_admin_manual
                          http://documentation.kopano.io/webapp_smime_manual
                          https://documentation.kopano.io/webapp_admin_manual

                          1 Reply Last reply Reply Quote 1
                          • Sinux
                            Sinux last edited by

                            good news, thanks man ;)

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post