timeAgoInWords in Russian
Hi bakers.
Do you want the dates written in your project like this: “1 day, 3 hours ago”
or like this: “2 months, 2 weeks, 3 days ago”?
Download the file from here and put it in "cakedir \ app \ locale \ rus \ LC_MESSAGES \".
Then in the file "app_controller.php" in the function "beforeFilter" we write the following:
That's it. Now where we need to display the date in this format we write:
Also, all these manipulations will help us to display the names of the months in Russian when using:
Questions can be asked: xmpp: cakephp@conference.jabber.ru
Do you want the dates written in your project like this: “1 day, 3 hours ago”
or like this: “2 months, 2 weeks, 3 days ago”?
Download the file from here and put it in "cakedir \ app \ locale \ rus \ LC_MESSAGES \".
Then in the file "app_controller.php" in the function "beforeFilter" we write the following:
Configure::write('Config.language', 'ru');
That's it. Now where we need to display the date in this format we write:
echo $time->timeAgoInWords($date);
Also, all these manipulations will help us to display the names of the months in Russian when using:
echo $form->input('Date', array('type'=>'date'));
Questions can be asked: xmpp: cakephp@conference.jabber.ru