From ff6fe9848afa6a80d6a200639df7ed408e8437fa Mon Sep 17 00:00:00 2001 From: Alex Arnaud Date: Mon, 8 Nov 2021 15:16:17 +0100 Subject: [PATCH] Bug 29393: Use patron language in letters Signed-off-by: Matthias Le Gac Signed-off-by: Martin Renvoize --- circ/add_message.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/circ/add_message.pl b/circ/add_message.pl index 102beb7babe..0795775354a 100755 --- a/circ/add_message.pl +++ b/circ/add_message.pl @@ -25,6 +25,7 @@ use C4::Auth qw( get_template_and_user ); use C4::Output; use C4::Letters; use Koha::Patron::Message; +use Koha::Patrons; my $input = CGI->new; @@ -60,6 +61,7 @@ elsif( $op eq 'cud-add_message' ) { message => $borrower_message, } )->store; + } if ( $message_type eq 'E' ) { @@ -68,10 +70,13 @@ elsif( $op eq 'cud-add_message' ) { content => $borrower_message }; + my $patron = Koha::Patrons->find( $borrowernumber ); + if ( $letter_code ) { $letter = C4::Letters::GetPreparedLetter( module => 'members', letter_code => $letter_code, + lang => $patron->lang, tables => { 'borrowers' => $borrowernumber }, -- 2.44.0