4

How to translate time_diff Twig filter?

I've setup all the needed to localize templates. In fact, if I use localizeddate the date is formatted following the localevariable I've set.

But, how to translate time_diff?

This is the code I'm using:

<time title="{{ order.srcCompletedOn|localizeddate('long', 'none', locale) }}" datetime="{{ order.srcCompletedOn|localizeddate('long', 'none', locale) }}">{{ order.srcCompletedOn|time_diff }}</time>
Aerendir
  • 6,152
  • 9
  • 55
  • 108
  • 3
    Possible duplicate of [Twig date time\_diff translation](http://stackoverflow.com/questions/34568838/twig-date-time-diff-translation) – Oylex Mar 11 '16 at 16:19

0 Answers0