Hello everyone,

I'm encountering a rather perplexing issue with the installation of the es_ES language in osTicket, and I'm reaching out for guidance or possible solutions within the community.

Following the official documentation, I downloaded and placed the es_ES.phar file for the Spanish language in the i18n folder of my osTicket installation. However, the situation took an unexpected turn when I tried to set es_ES as the secondary language. The system's behavior became erratic, laden with errors. The user interface lost its coherence, displaying misaligned elements and even missing information.

As part of my troubleshooting process, I attempted to change the agent's language individually, and I even directly modified the configuration file. However, both attempts proved futile in resolving the issue. The problem persisted, leaving me with no other option than to remove the es_ES.phar file from the i18n folder. (OFC I restarted the httpd service and the php).

To offer more context, here are my system specifications:
osTicket Version: v1.18 (724de45) — Up to date
Web Server Software: Apache/2.4.57 (CentOS 9 Stream)
MySQL Version: 8.0.34
PHP Version: 8.2.9

Your assistance and suggestions would be greatly appreciated. Thank you kindly for your time and consideration.

Best regards,
Kevin

  • KevinTheJedi replied to this.
  • KevinTheJedi
    Thank you 🙂, after reviewing the indicated.
    The solution was the following:

    1. Change the language files to the owner that is Apache, give it all 755 permissions (the same as the default EN language). ex ..../i18n/es_ES.phar
    2. Disable SE linux policies, first checking the service with sestatus and then if it says enforcing execute the setenforce 0command.
    3. Once this, restarts the httpd (Apache) and Php services. I checked that it worked and I passed it the SE Linux policies again:
      sudo setsebool -P httpd_can_network_connect 1
      semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/osTicket(/.*)?"
      sudo restorecon -Rv /var/www/osTicket/
    4. Finally we restart the services and enable the SeLinux again with setenforce 1 and indeed the language works correctly.

    Thanks for the help, the entire OsTicket team is doing a great job. I hope this answer can be of use to someone in the future.

    kevinazua

    Hmmm I can't replicate this. Can you please try reinstalling the language pack then restarting the webserver (and PHP-FPM if you're running it) and retest? Also, do you have the php-intl extension installed/enabled?

    Cheers.

    Hi, I did the same thing. Re-install the pack, restart the httpd and php-fpm services. Clear the cache, tried differents browsers. Also, yes, I have installed and enabled the php-intl.
    Maybe it's a bug in this new version
    These are my extensions:

      kevinazua

      I do not think this is a bug. I just went and downloaded latest Spanish (es_ES) language pack, uploaded it to my include/i18n/ folder, set it as a Secondary Language on my v1.18 instance running PHP 8.2, and nothing happened. Then I went to my Profile and set my Preferred Language to Spanish and everything worked as expected.

      Are you seeing any errors in any of your logs (general server logs, webserver error logs, PHP error logs, MySQL/MariaDB error logs, osTicket System Logs, Browser Console logs, etc.)?

      Cheers.

        KevinTheJedi
        Nothing appears in the osTicket logs, MySQL, PHP, Apache logs. My language is in /var/www/osTicket/upload/include/i18n/ . I can't check the live logs because it doesn't appear to re-set the language, when I install it and set it as secondary language just the preferences window in the agent crashes. In the configuration the language does not appear anymore until I eliminate it and define the English one. It looks like this:

        Thanks for your response

          kevinazua

          Then there has to be errors being logged somewhere. Please re-review your logs or contact your hosting provider for further assistance in finding the correct logs.

          Cheers.

            5 days later

            KevinTheJedi

            Hello Mr Kevin, sorry for the delay.
            After reviewing several logs that in theory were from php I was able to find a related one, located at: /var/log/php-fpm/www-error.log
            This is what appears in live logs once the Spanish language is installed and set as secondary
            [16-Aug-2023 05:39:39 UTC] PHP Fatal error: Uncaught ValueError: Path cannot be empty in /var/www/osTicket/upload/include/class.translation.php:568
            Stack trace:
            #0 /var/www/osTicket/upload/include/class.translation.php(352): Translation->load_tables()
            #1 /var/www/osTicket/upload/include/class.translation.php(380): gettext_reader->get_plural_forms()
            #2 /var/www/osTicket/upload/include/class.translation.php(414): gettext_reader->select_string()
            #3 /var/www/osTicket/upload/include/class.i18n.php(576): gettext_reader->ngettext()
            #4 /var/www/osTicket/upload/include/staff/settings-system.inc.php(118): _N()
            #5 /var/www/osTicket/upload/scp/settings.php(57): include_once('...')
            #6 {main}
            thrown in /var/www/osTicket/upload/include/class.translation.php on line 568

              kevinazua

              It’s saying the STREAM is empty which means the system cannot read the data from the translation file. Are you using a shared host? If so please reach out to them to see if they know what’s going on. Sometimes hosts have security rules in place that block such content.

              You also need to make sure the translation files have correct permissions and ownership. Lastly, you need to see if you are running something like SELinux as this can sometimes block content/files. If so, then simply add appropriate context to the file (there are many guides online that explain this).

              Cheers.

                KevinTheJedi
                Thank you 🙂, after reviewing the indicated.
                The solution was the following:

                1. Change the language files to the owner that is Apache, give it all 755 permissions (the same as the default EN language). ex ..../i18n/es_ES.phar
                2. Disable SE linux policies, first checking the service with sestatus and then if it says enforcing execute the setenforce 0command.
                3. Once this, restarts the httpd (Apache) and Php services. I checked that it worked and I passed it the SE Linux policies again:
                  sudo setsebool -P httpd_can_network_connect 1
                  semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/osTicket(/.*)?"
                  sudo restorecon -Rv /var/www/osTicket/
                4. Finally we restart the services and enable the SeLinux again with setenforce 1 and indeed the language works correctly.

                Thanks for the help, the entire OsTicket team is doing a great job. I hope this answer can be of use to someone in the future.

                Write a Reply...