Forum: Ruby on Rails how to transform data to database (translation -> i18n)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
916771842b2bdd0d28e4caa6b38bcb38?d=identicon&s=25 Jermaine (Guest)
on 2009-05-30 21:12
(Received via mailing list)
Hi Everyone,

I'm using I18n in my rails app and I'm very pleased about it. However,
I'm now having problems posting Date objects to the database. The
problem is that in my text field the date is represented in Dutch. So
for example:

I have a text field: <%= f.calender_date_select: date_attended %>
Where I fill in a date like: 26 oktober 2009

Now the database won't recognize this, and that's probably because
he's posting a foreign language to the database which he doesn't
understand. I'm guessing I should translate each month somewhere (in
the model??) like this:

Januari => January
Februari => Februari
Maart => March

etc.. etc..

Any suggestions??

Many thanks in advance.
This topic is locked and can not be replied to.