Can anybody help me with date localization?
My code:
<?php echo date("j F", ($data->create_time)); ?>
And it returns:
1 January
I want to translate this output to Russian language:
1 Января
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yii provides robust i18n functionality through classes such as
CDateFormatterandCLocale. You can get an instance of these classes for your application’s current language withYii::app()->getDateFormatter()andYii::app()->getLocale(). Use these to format your date with a format string either taken straight from the current locale (good if it works for you) or by specifying a custom string: