Reputation: 1222
How to sue i18n in kohana 3 with date()?
echo date('l jS F Y h:i:s A');
I don't know how I can translate day names, month names, etc...
Upvotes: 2
Views: 2550
Reputation: 1191
You should use strftime function, together with setlocale, date function does not support localization strings.
In your example, considering you want the date in french, it may be:
<?php
setlocale(LC_ALL, 'fr_FR');
echo strftime("%A %d %B %G %I:%M:%S %p") . "\n";
It will output Mardi 19 novembre 2013 01:41:59 am
Upvotes: 5