# Date format in different languages

**URL:** <https://forum.shopware.com/t/date-format-in-different-languages/37771>\
**Category:** Programmierung\
**Created:** [28. Juni 2016 um 17:15 UTC](https://forum.shopware.com/t/date-format-in-different-languages/37771 "2016-06-28T17:15:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cboita](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cboita](https://forum.shopware.com/u/cboita)\
**Post date:** [28. Juni 2016 um 17:15 UTC](https://forum.shopware.com/t/date-format-in-different-languages/37771/1 "2016-06-28T17:15:46Z")

</div>

Hi there,

On themes/Frontend/Bare/frontend/blog/box.tpl you have the follow block:

```
{* Date *}
{block name='frontend_blog_col_meta_data_date'}
    {if $sArticle.displayDate}
        {$sArticle.displayDate|date:"DATETIME_SHORT"}
    {/if}
{/block}

```

In our case we want to show date in a different format like:

```
{$sArticle.displayDate|date_format:"%d %B %Y"}

```

The problem is the output doesn’t take in account the selected shop localization for month translation. It always show us “28 June 2016”. In a german shop it would show us “28 Juni 2016”, but no.

How to fix this in Shopware?

&nbsp;

Thanks for helping

---

<div class="post-metadata">

**Author:** ![pino](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/pino/32/14373_2.png) [@pino](https://forum.shopware.com/u/pino)\
**Post date:** [30. Juni 2016 um 15:37 UTC](https://forum.shopware.com/t/date-format-in-different-languages/37771/2 "2016-06-30T15:37:50Z")

</div>

hi&nbsp;[cboita](https://forum.shopware.com/profile/22906/cboita),

its not a shopware problem.

```
$month = date('F');
echo $month;

```

> \_‚F‘&nbsp;_A full textual representation of a month, such as January or March -\>&nbsp;January&nbsp;through\_December_

[http://php.net/manual/en/function.date.php](http://php.net/manual/en/function.date.php)

You have to translate it by your own,&nbsp;like :

```
$lang = 'de';
$translate['de'] = array('Januar', 'Februar', 'März', ...);
$translate['en'] = array('January', 'February', 'March', ...);
$month = date('n');
echo $translate[$lang][$month-1];

```

you could do it with a plugin or try it with smarty.

smarty modifier:&nbsp;[Modifiers | Smarty](http://www.smarty.net/docs/en/plugins.modifiers.tpl)

example:

```
{$sArticle.displayDate|my_date_formate:'de'}

```

&nbsp;
