Osticket 1.14.2
PHP 7.3
Versão 10.4

I'm trying to create language pack
using https://github.com/osTicket/osTicket/blob/develop/setup/doc/i18n.md

but the errors:
php /home/vps/osticket/include/class.translation.php message.mo > message.mo.php
PHP Warning: Use of undefined constant INCLUDE_DIR - assumed 'INCLUDE_DIR' (this will throw an Error in a future version of PHP) in /home/vps/osticket/include/class.translation.php on line 857
PHP Stack trace:
PHP 1. {main}() /home/vps/osticket/include/class.translation.php:0
PHP Warning: require_once(INCLUDE_DIRclass.orm.php): failed to open stream: No such file or directory in /home/vps/osticket/include/class.translation.php on line 857
PHP Stack trace:
PHP 1. {main}() /home/vps/osticket/include/class.translation.php:0
PHP Fatal error: require_once(): Failed opening required 'INCLUDE_DIRclass.orm.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/vps/osticket/include/class.translation.php on line 857
PHP Stack trace:
PHP 1. {main}() /home/vps/osticket/include/class.translation.php:0

am i doing something wrong?

it doesn't work anymore?

Building language packs
In an effort for the php version of gettext to offer similar performance to the extension counterpart, a variant of the MO file is used which is a PHP serialized array written to a file. The original MO file functions basically like a text array. In stead of searching through the MO file for each string to be translated, the original and translated texts are placed into a hash array for quick access and the hash array is serialized for the language pack. At runtime, the hash array is recreated from the export and the strings are quickly accessed from the PHP hash array.

A MO file can be manually compiled using a command-line interface

php include / class.translation.php message.mo> message.mo.php

    robsonwr it doesn't work anymore?

    I do not understand the question. You have never been able to download translation files from the translation site and make a language pack.

    Yes, you can download Language Packs, de-phar them, and edit them.

    Write a Reply...