From 48948dc9fa6eb7a9f91ab752ccdbf7144de8e60c 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 Signed-off-by: Katrin Fischer --- circ/add_message.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/circ/add_message.pl b/circ/add_message.pl index 102beb7bab..0795775354 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.39.5