How to set tt_news date language wise in typo3


For set date in tt_news you can use below typoscript

Typoscript conditions:

plugin.tt_news{
  displayLatest{
    date_stdWrap.strftime = %A, %Y-%m-%d
  }
  displayList{
    date_stdWrap.strftime = %A, %Y-%m-%d
  }
  displaySingle{
    date_stdWrap.strftime = %A, %Y-%m-%d
  }
}

Output will be :

Tuesday, 1985-11-19

If you want to localize name of month & days in tt_news then you can use below typoscript

[globalVar = GP:L=1]
  ## set Italy date/time format for tt_news
  plugin.tt_news{
    displayLatest{
      date_stdWrap.strftime = %A, %Y-%m-%d
    }
    displayList{
      date_stdWrap.strftime = %A, %Y-%m-%d
    }
    displaySingle{
      date_stdWrap.strftime = %A, %Y-%m-%d
    }
  }
[global]

Output will be :

Martedì, 1985-11-19

if you use “date_stdWrap.strftime = %e %B %Y” then output will be “19 November 1985”
if you use “date_stdWrap.strftime = %b, %Y then output will be “Nov 1985”

All date format are available here

If you have any queries, please do not hesitate to contact me at Jainish Senjaliya

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s