views:

148

answers:

6

We want to build a app where we would like to show translated version of dynamic content as well. The transalted content would be uploaded by us (so we don't need any translation logic).

I was wondering if there any other gems to consider apart from the built-in i18n? i18n seems to be best for static data, but does not handle dynamic data.

A: 

There's globalize that might help you.
It allows you to add translated fields in your models.

And when you get the field's data, it retrieves the appropriate language's content.

Damien MATHIEU
I will give that a try . Thanks .
A: 

I wrote a blog post on scoping by locales which I think to be relevant to your interests.

Ryan Bigg
Thanks for the tip .
A: 

Globalize is a great plugin. You couldn't miss the same great tutorial about it on http://www.artweb-design.de/2006/11/10/get-on-rails-with-globalize-comprehensive-writeup.

However, it stores strings of all locales in a single database table. So it may brought 2 problems: 1. performance if your project is large; 2. How to get professional translators to cooperate.

So ruby-gettext-package is also an option. It natually avoids the 2 problems above.

broom9
A: 

I think Globalize2 might be what you are looking for, but it looks to be a bit outdated as the last announcement is that they support Ruby 1.2. However, the last push to the repo was on November 19th, so it might just be that the webpage is outdated.

dvyjones
+1  A: 

I worked on a similar situation. I developed a model to store multi-lingual data in the database without having to build a look-up table. The benefit of doing it this way is that it requires very little schema changes. Feel free to ask me any questions or post on the blog if you need help with anything.

Internationalization Blog Post: http://lanitdev.wordpress.com/2009/06/23/internationalization-data-storage-in-net-part-1/

Thanks

Andrew

bigamil
+1  A: 

I wrote a small plugin that might be useful for this : http://github.com/nmindia/has_translations

NM