Reputation: 31
I am getting the following error:
Notice: Use of undefined constant LC_MESSAGES - assumed 'LC_MESSAGES' in C:\Program Files\xampp\htdocs\xampp\phptest\resources\testi18n.php on line 19
Notice: Undefined index: language in C:\Program Files\xampp\htdocs\xampp\phptest\resources\testi18n.php on line 19
Deprecated: setlocale() [function.setlocale]: Passing locale category name as string is deprecated. Use the LC_* -constants instead in C:\Program Files\xampp\htdocs\xampp\phptest\resources\testi18n.php on line 19
the code:
<?php
setlocale( LC_MESSAGES, $_GET['language']);
bindtextdomain('messages', 'locale');
...
?>
I did test gettext extension is installed with php (it supported)
Upvotes: 3
Views: 3492
Reputation: 11
please DON'T use LC_ALL
, because you may have very bad side effect using languages like French.
In my case floatval()
and float conversion to string use the coma instead of the dot as the decimal separator. And it just put a bug mess in my db.
Upvotes: 1