Customer e-mails are always sent in default language

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Cegri
Posts: 7
Joined: Thu Nov 28, 2024 2:11 pm

Customer e-mails are always sent in default language

Post by Cegri »

Version of script: 3.5.1
Hosting company: Hetzner
What terms did you try when SEARCHING for a solution:
HESK reply email correct language new_ticket.txt

Write your message below:

I'm experimenting with Hesk multilingiual setup. Have Turkish and English installed, English as default.

The following are working;
  • Language selection at the Submit Ticket Form (...com/index.php?language=Türkçe&a=add)
  • Confirmation page also in Turkish.
  • Team member receives new_ticket_staff mail according to his profile language (irrespective of language used by customer.)
  • The ticket is automatically set to the correct language. (Observable at ...com/admin/edit_post.php?track=A4...)
However;
  • The customer always receives the new_ticket mail in the default language.
  • new_reply_by_staff is also received in the default language, irrespective of the language setting of the ticket.
Is this the expected behaviour, or am I missing something?
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Customer e-mails are always sent in default language

Post by Klemen »

No, this is not the correct behavior. It used to work correctly, but perhaps the 3.5.x update caused the issues.

I will investigate and prepare a fix if I can reproduce the issue.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Customer e-mails are always sent in default language

Post by Klemen »

Could you also confirm what your "Customer Accounts" setting is in Admin panel > Settings > Help desk please?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Cegri
Posts: 7
Joined: Thu Nov 28, 2024 2:11 pm

Re: Customer e-mails are always sent in default language

Post by Cegri »

The Customer Accounts are disabled.

In the meantime I have looked into the code.

In inc\email_functions.inc.php, function hesk_notifyCustomer, line 49;

Code: Select all

       // Make sure customer gets response in correct language
        $language = isset($customer['language']) ? $customer['language'] : HESK_DEFAULT_LANGUAGE;
I understand it is expected to get the language info from the Customers table. But that field does not seem to exist.

In any case; If the customer accounts are not used, the mail should be sent in the ticket's language.
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Customer e-mails are always sent in default language

Post by Klemen »

Agreed. I verified this, and it is indeed a bug in 3.5.x, it worked well before.

Will be fixed in 3.5.2, thanks for reporting.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Cegri
Posts: 7
Joined: Thu Nov 28, 2024 2:11 pm

Re: Customer e-mails are always sent in default language

Post by Cegri »

The following tweak worked for me:

Code: Select all

...
 // Make sure customer gets response in correct language
        if (isset($customer['language']))
        {
            $language = $customer['language'];
        }elseif ( isset($ticket['language']) )
        {
            $language = $ticket['language'];
        }
        if (!isset($language)) {
            $language = HESK_DEFAULT_LANGUAGE;
        }

        if (!isset($language)) {
            $language_to_customers[$language] = [];
        }
        $language_to_customers[$language][] = $customer;
    }
   ...
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Customer e-mails are always sent in default language

Post by Klemen »

Thanks for sharing. We'll need to look into it a bit deeper because in some cases the language setting isn't added to the profile. Should be fully fixed in 3.5.2
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply