Doc #72591 [Opn->Csd]: [RU] Wrong description for locale setting in function setlocale
| From: | rjhdby@php.net | Date: | Sun, 06 Nov 2016 18:44:47 +0000 |
| Subject: | Doc #72591 [Opn->Csd]: [RU] Wrong description for locale setting in function setlocale | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14075@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72591&edit=1
ID: 72591
Updated by: rjhdby@php.net
Reported by: mr dot vstas at gmail dot com
Summary: [RU] Wrong description for locale setting in
function setlocale
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Translation problem
Operating System: Ubuntu 14.04 LTS
PHP Version: 5.5.37
-Assigned To:
+Assigned To: rjhdby
Block user comment: N
Private report: N
New Comment:
already updated
Previous Comments:
------------------------------------------------------------------------
[2016-07-13 11:15:59] mr dot vstas at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.setlocale
Incorrect translate in cyrillic.
So it looks at the Russian:
------------------------------------------
"ÐÑли в каÑеÑÑве locale пеÑедан
NULL или "0", Ð»Ð¾ÐºÐ°Ð»Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð° не
бÑдеÑ, а бÑÐ´ÐµÑ Ð²Ð¾Ð·Ð²ÑаÑено
ÑекÑÑее знаÑение.
------------------------------------------
But in English.
------------------------------------------
If locale is NULL or the empty string "", the locale names will be set from the values of
environment variables with the same names as the above categories, or from "LANG".
If locale is "0", the locale setting is not affected, only the current setting is
returned.
------------------------------------------
This means that English is written for a different behavior for locale setting with "0" or
with NULL.
---
Test script:
---------------
// default locale ru_RU.UTF8
// change default locale to another. It's work correct.
var_dump(setlocale(LC_ALL,"ru_RU.CP1251"));
// return current locale. It's work correct and return ru_RU.CP1251
var_dump(setlocale(LC_ALL,"0"));
// the resulting behavior is not consistent
// with the description in the Russian translation of documentation
var_dump(setlocale(LC_ALL,NULL));
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72591&edit=1