Globalize on Rails

I had to convert some dates to Spanish for a recent project I was doing. Ordinarily, I would track down every piece of date text I have and edit them with their Spanish counterparts. Unfortunately the dates were dynamic and I didn’t really want to do a very big if-else statement. Fortunately globalize was there to save the day. This is really an awesome plugin that I have just started using but it’s really useful. Here’s a great tutorial for the globalize plugin.

You may encounter an error for the error_messages_for helper but don’t panic because here’s the fix for that.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: