Globalize mailing list: experiences article by Sven Fuchs

Since not everyone might be subscriped to the Globalize list and I still
don’t know if there’s an archive:

Sven F. wrote an article about his experiences setting up / using

– begin –

After having got totally thrilled about Globalize I’ve written down this
report about my first experiences:

I’m probably going to expand that by a follow up once I’ve collected
some more insights.

Appreciate any feedback/review/criticism of course.

Also, do you think this could/should be linked to from the Globalize
wiki? I’ve had read both of the “example” and “howto” pages over there,
but being a Rails newbie I found them a bit sparse (?) (no offense!
That’s just been my own dump noob perpective :slight_smile:

Thanks in advance!

Oh, btw … did I mention that I’m totally thrilled about Globalize?
Keep up that great work. I love it :slight_smile:

– end –

to which Josh Harvey replied

– begin –

Thanks a million, Sven! Your writeup is great, and exactly the kind of
thing Globalize needs. Please do link it in a prominent place in the
wiki. Maybe we should add a “docs” or “writeups” page; I’ll look into

A few comments:

The preferred way to setup a Globalize app now is with Jeremy Voorhis’s
“rake globalize:setup”. So, instead of “script/generate globalize tiny”
and “rake migrate”, just do “rake globalize:setup”.
You can see all the rake tasks by doing “rake -T” in your app’s home

You also don’t have to hardcode all the translations for your code. If
Globalize sees a word that hasn’t been translated yet, it will write a
NULL record to the database. You can then write a rails controller which
will look for all NULL records and let your translate them.

You may want to change the section where you mention <%=
@article.title.t -%>. As you mentioned later, the preferred way of doing
this is with the “translates” directive in the ActiveRecord model, and
<%= @article.title %> in the view. Behind the scenes, Globalize treats
this very differently, it’s not just a matter of leaving off the .t, so
<%= @article.title.t %> might give new users the wrong idea.

Of course, you would have know all this if there had already been a good
writeup like yours available :slight_smile:

– end –

and Sven answered

– begin –

Thanks, Joshua, for the friendly words :slight_smile: and comments!

I’ll go and update my post asap of course. At the very least I need to
mount up some warning signs.

As for the NULL values … LOL. I can’t believe that I’ve actually
noticed these rows, wondered about what strange kind of stuff’s
happening and later on even manually inserted extra copies of these with
my translations added. Ok, got it. slaps head

– end –

Sven updated his article…

– begin –

Hi Joshua, hi all,

ok, I’ve tried hard to correct the flaws in my first write-up, but I
felt that my actual experience and good recommendations to a newbie
really are two things that don’t mix well. :wink:

So I rewrote the whole thing:

I hope I’ve managed to straighten the flaws out. Otherwise please
correct me again.

I think I’m pretty snow-blind meanwhile. I’d very much appreciate both
tips/reviews regarding the content as well as regarding my English and

I’d then link that article to the wiki. There’s been some sudden
positive feedback. :slight_smile:

Thanks in advance!

– end –