I have a datetime stored in mysql as timestamp.
I then format the datetime using
$newdate = date('d M Y', strtotime($this->query->datetime));
My question is how do I translate the date using codeigniter builtin lang helper?
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.
in the application language folder add a subfolder for the language you want to translate to. In that folder make a file called date_lang.php and handle all you date translations.
Another option for translation of dates is to use locale.
PHP will handle the date translations for you. Set the locale globally for the user.
In my current project, we use the locale to handle money and dates. We use CI language files to handle string translations