Martin Cuellar activity https://gitlab.com/nelbren 2019-09-10T20:47:59Z tag:gitlab.com,2019-09-10:503452260 Martin Cuellar opened merge request !1: Fix to locale es es problem on debian10 at Slawka / NagiosQL 2019-09-10T20:47:59Z nelbren Martin Cuellar

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
tag:gitlab.com,2019-09-10:503450370 Martin Cuellar pushed to project branch 3.4.0 at Martin Cuellar / NagiosQL 2019-09-10T20:45:19Z nelbren Martin Cuellar

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

tag:gitlab.com,2019-09-10:503450369 Martin Cuellar accepted merge request !1: Fix to locale en_US problem on Debian 10 at Martin Cuellar / NagiosQL 2019-09-10T20:45:19Z nelbren Martin Cuellar

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
tag:gitlab.com,2019-09-10:503439569 Martin Cuellar opened merge request !1: Fix to locale en_US problem on Debian 10 at Martin Cuellar / NagiosQL 2019-09-10T20:28:26Z nelbren Martin Cuellar

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
tag:gitlab.com,2019-09-10:503427542 Martin Cuellar pushed new project branch fix-to-locale-es_ES-problem-on-Debian10 at Martin Cuellar / NagiosQL 2019-09-10T20:11:02Z nelbren Martin Cuellar

Martin Cuellar (dd873dea) at 10 Sep 20:11

Fix to locale en_US problem on Debian 10

tag:gitlab.com,2019-09-10:503293682 Martin Cuellar created project Martin Cuellar / NagiosQL 2019-09-10T17:06:17Z nelbren Martin Cuellar