note 23095 deleted from ref.gettext by cmb

From: Date: Sun, 01 Dec 2019 09:16:01 +0000
Subject: note 23095 deleted from ref.gettext by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-213349@lists.php.net to get a copy of this message
Note Submitter: ywliu atsign hotmail com ---- Hello, For users with Red Hat GNU/Linux (at least 6.2) to use gettext, I'd like to make some notes here : 1. Calling setlocale() is necessary, where calling putenv('LANG=xx_YY') or putenv('LC_ALL=xx_YY') is not. 2. The country/language code should be in the "language_country" form,such as, "en_US" or "fr_FR", or any entry in /usr/share/locale/locale.aliase . The simple ISO two-letter code, such as "en" , is not valid. You can examine the return value of setlocale to see if the locale setting succeeds. This took me several hours to debug. I hope my experience can save you some time. This may apply to other Linux distributions or *BSD systems. I don't know. I hope this helps. Yen-Wei Liu

« previous php.notes (#213349) next »