note 114062 added to function.gettext
| From: | mikko dot rantalainen at peda dot net | Date: | Wed, 08 Jan 2014 06:17:56 +0000 |
| Subject: | note 114062 added to function.gettext | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-198145@lists.php.net to get a copy of this message | ||
Worth noting is that gettext honors environment variables while selecting the language to use: http://www.gnu.org/software/gettext/manual/html_node/Locale-Environment-Variables.html
"When a program looks up locale dependent values, it does this according to the following
environment variables, in priority order:
LANGUAGE
LC_ALL
LC_xxx, according to selected locale category: LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE,
LC_MONETARY, LC_MESSAGES, ...
LANG
Variables whose value is set but is empty are ignored in this lookup. "
In short, if you have non-empty LANGUAGE, you may end up with unexpected localization strings. On
the other hand, LANGUAGE can be used to define fallback language if some translation is missing.
----
Server IP: 62.237.7.3
Probable Submitter: 130.234.78.125
----
Manual Page -- http://php.net/manual/en/function.gettext.php
Edit -- https://master.php.net/note/edit/114062
Del: integrated -- https://master.php.net/note/delete/114062/integrated
Del: useless -- https://master.php.net/note/delete/114062/useless
Del: bad code -- https://master.php.net/note/delete/114062/bad+code
Del: spam -- https://master.php.net/note/delete/114062/spam
Del: non-english -- https://master.php.net/note/delete/114062/non-english
Del: in docs -- https://master.php.net/note/delete/114062/in+docs
Del: other reasons-- https://master.php.net/note/delete/114062
Reject -- https://master.php.net/note/reject/114062
Search -- https://master.php.net/manage/user-notes.php