# Translating date chosen in panel into specific language on the frontend

**URL:** <https://forum.getkirby.com/t/translating-date-chosen-in-panel-into-specific-language-on-the-frontend/26571>\
**Category:** Questions\
**Created:** [September 26, 2022, 8:00am UTC](https://forum.getkirby.com/t/translating-date-chosen-in-panel-into-specific-language-on-the-frontend/26571 "2022-09-26T08:00:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ewalthert](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ewalthert/32/7486_2.png) [@ewalthert](https://forum.getkirby.com/u/ewalthert)\
**Post date:** [September 26, 2022, 8:00am UTC](https://forum.getkirby.com/t/translating-date-chosen-in-panel-into-specific-language-on-the-frontend/26571/1 "2022-09-26T08:00:45Z")

</div>

I’m struggling to translate the `->toDate('d F Y');` into Dutch.  
Looked into the php resources, but the examples used for server-time don’t seem to work with the `date` field.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [September 26, 2022, 9:00am UTC](https://forum.getkirby.com/t/translating-date-chosen-in-panel-into-specific-language-on-the-frontend/26571/2 "2022-09-26T09:00:42Z")

</div>

> [@Problem translating month names](https://forum.getkirby.com/t/problem-translating-month-names/25501/2):
>
> strftime relies on the OS level locale settings and language packs. Looks like your server doesn’t have the German language packs installed. Besides this, I’d recommend against the use of strftime as it has been deprecated as of PHP 8.1. The good news is that you can use the [IntlDateFormatter](https://www.php.net/manual/en/class.intldateformatter.php) class. That uses language packs that come (as far as I understand it) bundled with PHP, so you don’t rely on OS functionality that changes from machine to machine. The even better news is that Kirby 3.6.5…

---

<div class="post-metadata">

**Author:** ![ewalthert](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ewalthert/32/7486_2.png) [@ewalthert](https://forum.getkirby.com/u/ewalthert)\
**Post date:** [September 26, 2022, 9:22am UTC](https://forum.getkirby.com/t/translating-date-chosen-in-panel-into-specific-language-on-the-frontend/26571/3 "2022-09-26T09:22:24Z")

</div>

Thanks @texnixe, I’ll look into this.

---

<div class="post-metadata">

**Author:** ![ewalthert](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ewalthert/32/7486_2.png) [@ewalthert](https://forum.getkirby.com/u/ewalthert)\
**Post date:** [September 26, 2022, 12:30pm UTC](https://forum.getkirby.com/t/translating-date-chosen-in-panel-into-specific-language-on-the-frontend/26571/4 "2022-09-26T12:30:48Z")

</div>

I did use

```auto
return [
    'date' => [
        'handler' => 'intl'
    ]
];

```

But still could not get the dates to appear in Dutch.  
Things also got messy with the time. HH:MM returns 09:09 instead of 09:00.

So I installed the Dutch language as default and did the `translations =>` approach.

```auto
return [
    'code' => 'nl',
    'default' => true,
    'direction' => 'ltr',
    'locale' => [
        'LC_ALL' => 'nl_NL'
    ],
    'name' => 'Dutch',
    
    'translations' => [
	    'January' => 'januari',
	    'February' => 'februari',
	    'March' => 'maart',
	    'April' => 'april',
	    'May' => 'mei',
	    'June' => 'juni',
	    'July' => 'juli',
	    'August' => 'augustus',
	    'September' => 'september',
	    'October' => 'oktober',
	    'November' => 'november',
	    'December' => 'december'
    ],
    'url' => '/'
];

```

But I still don’t get the translation of the dates to work.  
Probably I should just drop the months being write in full and rather use an international format.

I guess this works only for non default languages.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [September 26, 2022, 3:54pm UTC](https://forum.getkirby.com/t/translating-date-chosen-in-panel-into-specific-language-on-the-frontend/26571/5 "2022-09-26T15:54:00Z")

</div>

What is your Kirby version?

---

<div class="post-metadata">

**Author:** ![ewalthert](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ewalthert/32/7486_2.png) [@ewalthert](https://forum.getkirby.com/u/ewalthert)\
**Post date:** [September 26, 2022, 7:06pm UTC](https://forum.getkirby.com/t/translating-date-chosen-in-panel-into-specific-language-on-the-frontend/26571/6 "2022-09-26T19:06:20Z")

</div>

Dear @texnixe this project is on Kirby 3.7.5, might switching to 3.8 help?
