note 42142 added to ref.gettext
| From: | stefan+usenet at froehlich dot priv dot at | Date: | Wed, 05 May 2004 08:30:15 +0000 |
| Subject: | note 42142 added to ref.gettext | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-69221@lists.php.net to get a copy of this message | ||
Reading the line
<? php setlocale(LC_ALL, 'de_DE'); ?>
here over and over again, I have to warn using it, as there are severe caveats. For certain locales,
LC_NUMERIC swaps period and comma, which may e.g. lead to decimals silently stripped of numbers,
when inserting rows into an SQL database. So DON'T do this, but use
<? php setlocale(LC_MESSAGES, 'de_DE'); ?>
instead, which does exactly what you want, without any nasty side effecs.
----
Manual Page -- http://www.php.net/manual/en/ref.gettext.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42142
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42142&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42142&report=yes
Search -- http://master.php.net/manage/user-notes.php