From 3bd68dace98a6cf72c862a512b11851299f1b333 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 31 Oct 2018 11:02:56 -0300 Subject: [PATCH] Bug 15395: Use POSIX::setlocale To keep compatibility with jessie (that have Message::Locales 1.23, so without setlocale) Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens --- Koha/I18N.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Koha/I18N.pm b/Koha/I18N.pm index 2152654d5a..72062239d8 100644 --- a/Koha/I18N.pm +++ b/Koha/I18N.pm @@ -24,7 +24,8 @@ use C4::Languages; use C4::Context; use Encode; -use Locale::Messages qw(:locale_h setlocale LC_MESSAGES); +use Locale::Messages qw(:locale_h LC_MESSAGES); +use POSIX qw( setlocale ); use Koha::Cache::Memory::Lite; use parent 'Exporter'; @@ -55,7 +56,7 @@ sub init { # LANG needs to be set to a valid locale, # otherwise LANGUAGE is ignored $ENV{LANG} = $system_locales[0]; - setlocale(LC_MESSAGES, ''); + POSIX::setlocale(LC_MESSAGES, ''); my $langtag = C4::Languages::getlanguage; my @subtags = split /-/, $langtag; -- 2.39.5