@@ -, +, @@ language includes in slips --> uses patron's preferred language --> if patron's preferred language is 'default', use the interface language --> if there is no interface (for overdue_notices for example), use the first language in 'language' system preference 1.1. gulp po:update fr-CA ./misc/translator/translate install fr-CA 1.2. In Administration > Global system preferences, search for language and check the added language --> On the printed slip, there's the word 'Payment' in English (OK) --> On the printed slip, the word 'Payment' is still in English (not ok) --> On the printed slip, the word 'Payment' is still in English (not ok) --> On the printed slip, the word 'Payment' is in the other language (Paiement) (OK) 12.1. Edit the patron's account and change back the preferred language to 'default' 12.2. In Administration > Global system preferences, disable TranslateNotices --> On the printed slip, the word 'Payment' is in the other language (Paiement) --> On the printed slip, the word 'Payment' is in English --> On the printed slip, the word 'Payment' is in the other language (Paiement) --- C4/Letters.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) --- a/C4/Letters.pm +++ a/C4/Letters.pm @@ -1594,7 +1594,18 @@ sub _process_tt { my $loops = $params->{loops}; my $objects = $params->{objects} || {}; my $substitute = $params->{substitute} || {}; - my $lang = defined($params->{lang}) && $params->{lang} ne 'default' ? $params->{lang} : 'en'; + my $lang = 'en'; + my $interface = C4::Context->interface; + if(defined($params->{lang}) && $params->{lang} ne 'default'){ + $lang = $params->{lang}; + } elsif($interface eq 'intranet' || $interface eq 'opac') { + #use interface language + $lang = C4::Languages::getlanguage(); + } else { + # Pick the first selected syspref language + my @languages = split /,/, C4::Context->preference('language'); + $lang = shift @languages; + } my ($theme, $availablethemes); my $htdocs = C4::Context->config('intrahtdocs'); --