php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #24518 strftime() output not translated after setlocale()
Submitted: 2003-07-06 23:56 UTC Modified: 2003-07-08 14:35 UTC
From: phpspam at netebb dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.0.0b1 (beta1) OS: Windows 2000 SP2
Private report: No CVE-ID: None
 [2003-07-06 23:56 UTC] phpspam at netebb dot com
Description:
------------
<?php
setlocale(LC_ALL, 'es_ES');
echo strftime("%A %e %B %Y");
?>

works fine on Debian, but fails on Windows 2000 SP2.

gettext() *does* work in Windows though, so I know it's not a configuration issue (i.e., extension=php_gettext.dll).

I've tested this with both php 5.0.0 and php 4.3.2.

Cheers,

Ross


Reproduce code:
---------------
<?php
setlocale(LC_ALL, 'es_ES');
echo strftime("%A %e %B %Y");
?>

Expected result:
----------------
domingo 6 julio 2003 

Actual result:
--------------
Sunday July 2003

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-07 09:37 UTC] sniper@php.net
The locale names are not same under windows.
Use 'setlocale(LC_ALL, "spanish");' instead.
(that works fine for me under Windows XP and RH Linux)

Making this documentation issue.


 [2003-07-08 14:35 UTC] betz@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

Tips for supported locale strings on Windows can now be found in the docs. Changes made can be viewed here:
http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/setlocale.xml?sbt=1&login=2&r1=1.10&r2=1.11&ty=u

 [2020-02-07 06:12 UTC] phpdocbot@php.net
Automatic comment on behalf of betz
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=7b1a1fa844fd6d5360a50273f9807f95c006c054
Log: tips for windows added win specific example typos fixed bugfix #24518
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Aug 20 10:01:27 2024 UTC