Please verify the problem using this code, when the es_ES locale is set on Debian GNU/Linux 10:
martin@debian101:/var/www/html/nagiosql$ cat test3.php
<?php
$locale = "es_ES";
setlocale(LC_ALL, $locale.".UTF-8");
bindtextdomain($locale, dirname(__FILE__)."/config/locale");
textdomain($locale);
// This fail.
echo _("Welcome")."\n";
// This works!
putenv("LANGUAGE=");
echo _("Welcome")."\n";
?>
With the putenv("LANGUAGE=");, the gettext works.
martin@debian101:/var/www/html/nagiosql$ php test3.php
Welcome
Bienvenido
Martin Cuellar (a53f960f) at 10 Sep 20:45
Merge branch 'fix-to-locale-es_ES-problem-on-Debian10' into '3.4.0'
... and 1 more commit
Please verify the problem using this code, when the es_ES locale is set on Debian GNU/Linux 10:
martin@debian101:/var/www/html/nagiosql$ cat test3.php
<?php
$locale = "es_ES";
setlocale(LC_ALL, $locale.".UTF-8");
bindtextdomain($locale, dirname(__FILE__)."/config/locale");
textdomain($locale);
// This fail.
echo _("Welcome")."\n";
// This works!
putenv("LANGUAGE=");
echo _("Welcome")."\n";
?>
With the putenv("LANGUAGE=");, the gettext works.
martin@debian101:/var/www/html/nagiosql$ php test3.php
Welcome
Bienvenido
Please verify the problem using this code, when the es_ES locale is set on Debian GNU/Linux 10:
martin@debian101:/var/www/html/nagiosql$ cat test3.php
<?php
$locale = "es_ES";
setlocale(LC_ALL, $locale.".UTF-8");
bindtextdomain($locale, dirname(__FILE__)."/config/locale");
textdomain($locale);
// This fail.
echo _("Welcome")."\n";
// This works!
putenv("LANGUAGE=");
echo _("Welcome")."\n";
?>
With the putenv("LANGUAGE=");, the gettext works.
martin@debian101:/var/www/html/nagiosql$ php test3.php
Welcome
Bienvenido
Martin Cuellar (dd873dea) at 10 Sep 20:11
Fix to locale en_US problem on Debian 10