Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

[MOD] Multilanguage Support



  • The "Autoresponse sent to user, if enabled, on new ticket." is the title for all templates is a bug in the unmodified osticket too when I test - I have filled an issue at Github.

    scp/pwreset.php is missing translation

    scp/settings.php?t=pages is still missing translations
  • Fixed those two pages.
  • Thank you.

    After the last changes pwreset.php is not working.
    From the Apache log I get:
    PHP Parse error: syntax error, unexpected '.' in /var/www/vhosts/osticket/scp/pwreset.php on line 45
  • fixed, sorry, forgot to remove the dot
  • Ok - worked when I just removed the .

    This part of the pwreset.php is still missing translation:

    A confirmation email has been sent

    A password reset email was sent to the email on file for your account. Follow the link in the email to reset your password.

    Login (button)

    It's actually in ./include/staff/pwreset.sent.php
  • Added wrappers to those too
  • Hallo,

    danke für diese super notwendige Erweiterung von osTicket und die Anpassung an die neue Version 1.7.1.

    Ich hab nun folgendes Problem, wobei ich aber nicht genau weiss ob es an diesem Mod hier für liegt:

    Bei meiner Installation funktioniert das 'Antwort-Trennzeichen' nicht. Das hab ich aktiviert in den Admineinstellungen, aber trotzdem wird beim Antworten auf einem Ticket der Text der E-Mail nicht abgeschnitten.

    Kann das an dem Mod liegen oder ist das ein anderes Problem?

    Danke für die Info.
  • How to update


    I need help. pls!!! :o
  • Hey, just follow this:

    But remember... BACKUP FIRST! :D
  • PapiMigas;45016 said:
    Hey, just follow this:

    But remember... BACKUP FIRST! :D
    Thx, this works perfect! :D
  • @spoh
    Ich denke nicht, dass es etwas mit der mod zu tun hat. Sicher sein kann ich mir leider nicht. Ich habe keinen Mailserver zur Hand mit dem ich das testen könnte. Die derzeit modifizierte Version ist Ich werde Sie in Kürze auf aktualisieren. Vielleicht wird das Abhilfe schaffen.
  • Danke für die Info. Leider habe ich es bis jetzt auch nicht geschafft osTicket nochmals ohne Mod zu installieren, um zu schauen ob es da funktioniert. Aber vielleicht komm ich heute Abend dazu...
  • PT Language


    Maybe you can help me...
    I downloaded your 1.7 stable Portugal zip;
    I had installed via cpanel the latest automatic release 1.7 via softaculous;
    What is the best way to merge it with your version?
    If I upload all your content to my online installation, what files would I change to make it correspond to online db settings?
  • When a user is creating a Ticket, they get de mail "New Ticket Auto-Response" in de mail is a link to view the ticket online with the variable "%{ticket.client_link}"

    The problem is that the link is to long for the email and that the link is cut in to 2 lines, because of that the link doesn't directly work. The user need to select the 2 lines en copy and paste it in the browser.

    example link:
    The variable %{ticket.client_link} =


    We use osticket_1.7-stable_multilanguage_V6

    How can we fix this. Does anybody have a solutions?


  • released

    If you are not started with yet as you wrote you should use that have been released.
  • @EICT-W
    Please try a different email-client to ensure whether the error lies within osticket or not.

    @olest, spoh
    done porting to
  • Is there any repository where we can find other translation .mo file?
    I am looking for a french version of messages .po and I am pretty sure that someone already did it.

    Thanks for that excellent work
  • Template title missing translation after fix

    With this fix to translation is missing:

    Change line 74 in from:

    <?php echo Format::htmlchars($nfo['desc']); ?>


    <?php echo Format::htmlchars($tpl['desc']); ?>


    <?php echo __(Format::htmlchars($tpl['desc'])); ?>

  • Hello,

    At first testlang.php outputs this:

    Your browser preferred language is: 'nb-no'
    The following folder will be used to translate your osticket: 'en'

    then i create a redirect in */en/: and testlang.php outputs this:

    Your browser preferred language is: 'nb-no'
    using the redirect file include/locale/en/redirect
    redirecting to 'nb-no'
    The following folder will be used to translate your osticket: 'nb-no'

    Copy of gettext-confiig

    //Multilanguage Support
    //To add additional languages add a folder with your language code to 'include/locale' (for example 'de-de'), create the folder 'LC_MESSAGES' inside it and create your
    //'messages.po' file inside 'LC_MESSAGES'. With the example of de-de the full path to 'messages.po' should look like 'include/locale/de-de/LC_MESSAGES/messages.po'.
    //In case you don't know your language code (or to be more precise: the one your browser prefers), open the php page: 'testlang.php'

    //the language detection first checks if a language folder, that has the same name as the preferred broser language exists
    //if that is the case it checks whether it should redirect to another language folder or not
    //if that isn't the case it tries to split the language code to its short version and does the same checks
    //it doesn't check the sanity of the redirect file, so make sure the content is valid

    //to redirect a language code to a different one, create a folder inside 'include/locale' that represents the language code you want to redirect and then create a file called 'redirect' in it.
    //the content of 'redirect' has to be the language code it should redirect to.
    //you want to redirect the language code 'de-de' to the code 'de'
    //create a folder inside 'include/locale' called 'de-de'. then create the file 'redirect' in it. the path to this redirect should now look like 'include/locale/de-de/redirect'.
    //now open the redirect file you've created, type de in the first line and save it

    $use_php_gettext=false; //Set this to false to disable php_gettext

    //In some cases if you use the gettext extension it'll not translate. Usually that happens on linux side.
    //You'll then have to determine what languagecodes your OS supports by typing 'locale -a' in a terminal.
    //Set the $encoding variable to one of the following '.utf8', '.UTF8', '.UTF-8'
    //Which one of those depends on what the 'locale -a' returned for you.


    $language=getDefaultLanguage(); //if you want to use just one static language replace the call to getDefaultLanguage() with your language code (for example 'de-de')

    //get the first and second part of the language code

    if(!file_exists(INCLUDE_DIR.'locale/'.$language)||!is_dir(INCLUDE_DIR.'locale/'.$language)) //check short langcode
    $language=''; //set as default
    //check if a redirect file is in there
    $f = fopen(INCLUDE_DIR.'locale/'.$language.'/redirect','r');
    $line = fgets($f);
    if(strlen($line)>=2) //safety check
    $language=$line; //redirect language

    // gettext setup
    $domain = 'messages';
    putenv('LC_ALL=' . $language);
    setlocale(LC_ALL, $language.$encoding);
    bindtextdomain($domain, INCLUDE_DIR.'locale');
    function __($text){return _($text);}
    else if($use_php_gettext==true&&function_exists('mb_detect_encoding'))
    T_setlocale(LC_ALL, $language);
    // Set the text domain as 'messages'
    T_bindtextdomain($domain, INCLUDE_DIR.'locale');
    T_bind_textdomain_codeset($domain, 'UTF-8');
    function __($text){return $text;} //fallback definition: in case the gettext extension wasn't loaded osticket should at least work in english

    GetText Support enabled and


    Multibyte Support enabled
    Multibyte string engine libmbfl
    HTTP input encoding translation disabled
    libmbfl version 1.3.2

    local -a outputs this:


    But still no translation from english into norwegian.

    Translation is located here:
  • You need to create a folder named "no" with a file named "redirect" in it.
    File "redirect" should have the line "no_NO" in it.

    Inside "no_NO" you should have "LC_MESSAGES" folder with messages.po and in it.
  • Hi

    If you need like me to have a dynamic language detection then you will have the problem of the landing page, offline page and thank-you page which have been set in the db. Therefore, when users select his prefered language, site pages are not translated dynamically.

    I have set the following solution (maybe not the best but it works )

    first create how many site pages as needed. I personally created new Landing fr, offline fr, thank-you fr, which have respectively id 5, 6, 7 (see in db table "ost_page").

    then I set the following modification

    /* in gettext-conf.php */

    function setCodeVariableLanguage($locale) {
    global $CodeLanguage;
    global $CodeCountry;

    // extract the country code and the language code
    $split = explode(\"_\",$locale);
    $CodeLanguage = $split[0];
    $CodeCountry = strtolower($split[1]);

    $language=getSelectedLanguage(); //
    setCodeVariableLanguage($language); // set global $CodeLanguage and $CodeCountry

    getSelectedLanguage() is a function that get user selected language from $_session, if none from cookies, if none from default define one.

    $CodeLanguage will contain "en","de" or "fr",...
    then we just needd to be sure that the correct page is loaded

    /* in class.config.php */

    function getLandingPageId() {
    global $CodeLanguage;
    return $this->get('landing_page_id'.'_'.$CodeLanguage);

    function getOfflinePageId() {
    global $CodeLanguage;
    return $this->get('offline_page_id'.'_'.$CodeLanguage);

    function getThankYouPageId() {
    global $CodeLanguage;
    return $this->get('thank-you_page_id'.'_'.$CodeLanguage);

    then new entries have to be created in ost_config table.

    INSERT INTO `ost_config` (`namespace`,`key`,`value`,`updated`)
    VALUES (\"core\", \"landing_page_id_fr\", 5, NOW())

    Hope it can help somebody.

  • Status of ticket in print not translated

    When printing a ticket the status (open/closed) is not translated.

    change line 125 in include/class.pdf.php
    $this->Cell($c, 7, $ticket->getStatus(), 1, 0, 'L', true);
    $this->Cell($c, 7, __($ticket->getStatus()), 1, 0, 'L', true);

    In same file there is a general bug:
  • Thane;45339 said:
    Please try a different email-client to ensure whether the error lies within osticket or not.

    @olest, spoh
    done porting to
    I did try other email clients as well same result
  • edited October 2013
    porting done, thanks for your help

    There was a change in the mailer class in the new release. Your bug with the links may be fixed.

    Please check if that site is served with utf-8 encoding. There are some issues if the server sends osticket sites with something other than utf-8. Does it affect all forms or just a specific one?
  • edited October 2013
    Danke schoen Thane, fuer Ihre besonders gut Arbeit.

    I'm add updated source file message.po (English) compatibility with osticket_1.7.2-stable_ml_V9
  • edited October 2013
    I think I found a bug, when adding a knowledge base page appears at the end of this command line was not closed!

    not find the file to change

    version osticket 1.7.2 multilanguage v9
  • edited January 2014

    Do you plan to update to 1.7.4? Can we help doing this?

  • Download link is not working

    Can you provide us with an new link please

  • Hi all,

    Any mirror for this MOD Plzzzzzzzzzzzzzz ?! :(
    Link is not working anymore...

    Tks a million.

Sign In or Register to comment.