Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#28472 closed enhancement (wontfix)

WordPress should use setlocale() to ensure consistent string, dates, times and numbers handling

Reported by: howardtw's profile howardtw Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9.1
Component: I18N Keywords: close dev-feedback
Focuses: Cc:


I've grep thru the WordPress source and find no use of "setlocale", I think it should use a default setlocale() to ensure consistent string, dates, times and numbers handling.

For example, in Drupal, it is

setlocale(LC_ALL, 'C');

Change History (2)

#1 @Denis-de-Bernardy
10 years ago

  • Keywords close dev-feedback added

It's not used for good reasons. Per the PHP docs:

The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server API like IIS or Apache on Windows, you may experience sudden changes in locale settings while a script is running, though the script itself never called setlocale(). This happens due to other scripts running in different threads of the same process at the same time, changing the process-wide locale using setlocale().

#2 @wonderboymusic
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

comment:1 explains why

Note: See TracTickets for help on using tickets.