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

Sven Fuchs wrote an article about his experiences setting up / using 
Globalize

-- begin --

After having got totally thrilled about Globalize I've written down this 
report about my first experiences:
http://www.artweb-design.de/articles/2006/06/09/real-fun-get-on-rails-with-globalize

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 :)

Thanks in advance!

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

-- 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 
that.

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 
directory.

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 :)

-- end --

and Sven answered

-- begin --

Thanks, Joshua, for the friendly words :) 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 --

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Railsi18n-discussion mailing list
Railsi18n-discussion@rubyforge.org
http://rubyforge.org/mailman/listinfo/railsi18n-discussion

Reply via email to