# Setlocale() doesn't work

**URL:** https://community.localwp.com/t/setlocale-doesnt-work/9351
**Category:** Support
**Created:** [November 8, 2018, 2:31pm UTC](https://community.localwp.com/t/setlocale-doesnt-work/9351 "2018-11-08T14:31:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ProxxiM](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/proxxim/32/5784_2.png) [@ProxxiM](https://community.localwp.com/u/ProxxiM)
#### Post date: [November 8, 2018, 2:31pm UTC](https://community.localwp.com/t/setlocale-doesnt-work/9351/1 "2018-11-08T14:31:57Z")

</div>

In my testing environment, I’m trying to output dates in my own language (Dutch). I do this with the PHP-function [strftime()](http://php.net/manual/en/function.strftime.php) and by using [setlocale()](http://php.net/manual/en/function.setlocale.php).

But somehow Local doesn’t seem to support changes through setlocale, the setlocale value stays at ‘C’, after trying to change it. How to do this, so I can properly test this part of my code?

```
    /* Set locale to Dutch */
   setlocale(LC_ALL, 'nl_NL');

   /* Output: vrijdag 22 december 1978 */
   echo strftime("%A %e %B %Y", mktime(0, 0, 0, 12, 22, 1978));

```

This should output ‘vrijdag 22 december 1978’, but I get ‘Friday 22 December 1978’.

---

<div class="post-metadata">

### Author: ![ideo77](https://avatars.discourse-cdn.com/v4/letter/i/dec6dc/32.png) [@ideo77](https://community.localwp.com/u/ideo77)
#### Post date: [November 9, 2018, 9:48am UTC](https://community.localwp.com/t/setlocale-doesnt-work/9351/2 "2018-11-09T09:48:42Z")

</div>

I confirm it, I have the same problem with setlocale(), and I can’t figure it out.

---

<div class="post-metadata">

### Author: ![ProxxiM](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/proxxim/32/5784_2.png) [@ProxxiM](https://community.localwp.com/u/ProxxiM)
#### Post date: [May 15, 2019, 7:43am UTC](https://community.localwp.com/t/setlocale-doesnt-work/9351/3 "2019-05-15T07:43:32Z")

</div>

@Flywheel, is there any way to change the time settings for a Local installation?  
Or for the whole installation?

This is very problematic when writing functions that depend on dates, a solution or workaround is needed.

---

<div class="post-metadata">

### Author: ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)
#### Post date: [August 25, 2020, 6:35pm UTC](https://community.localwp.com/t/setlocale-doesnt-work/9351/4 "2020-08-25T18:35:44Z")

</div>


