Bug 15395: Use POSIX::setlocale
To keep compatibility with jessie (that have Message::Locales 1.23, so without setlocale) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
ee0c8f319a
commit
3bd68dace9
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue