Hey again!
Here's the problem right now. How to localize the dates (created_at, updated_at) found in tables? I've tried the following in one of my views:
<p><%= t('%name wrote this on %date', {'%name' => questbook_entry.name, '%date' => questbook_entry.created_at}) %></p>
-jyrki
try with this
$date_helper->locale_date($questbook_entry->created_at)
Thanks salavert!
-jyrki
delia, I think you're missusing Ak::locale('j D');
Ak::locale looks for an index on the $locale array in your config/locales/LOCALE.php files
As an example for i18n a date and months, you can do something like:
On your locale file
$locale['full_text_date'] = "%s %d of %s, year %d";
$locale['days'] = "Sunday,Monday,Tuesday....";
$locale['months'] = "January,February.....";
In a helper
function full_text_date(){
$days = Ak::toArray(Ak::locale('days'));
$months = Ak::toArray(Ak::locale('months'));
return sprintf($locale['full_text_date'], $days[date('w')], date('j'), $months[date('n')+1], date('Y'));
}
Hope it helps
delia, I'd like the Akelos community to embrace the "There are no dumb questions culture", so don't worry … y bienvenidas sean tus preguntas :)
1 to 8 of 8