Balancing On Rails

August 01, 2007

Internationalization

I have no idea why I18N is not implemented either in Ruby or in Rails. I know the only argument that applies to it is that Ruby is still not 2.0. So we should not be expecting many advanced features in Ruby.

Granted that, I think we are in 2007, not in 1997. I can understand if Ruby came out in 1997 and didn't have I18N, it was acceptable. Because web applications were not popular that time.

But we are in 2007 and Ruby on Rails is touted as the best framework available for building web based applications. While we are fighting about scalability of Ruby on Rails for a large scale web application, I am surprised that people are not talking about internationalization.

Yes, there are two plug-ins available for I18N. One is Globalize and other is Globalite. While Globalize is the heavy one, but I disliked it because of the feature that it uses database to store the strings. Coming from Java where resources are stored in a text file and parsed while the application is loaded, always seemed a good idea. I don't want to use database because I don't want my application to connect to database for every string that it wants to internationalized.

Globalite is a lighter model, but the documentation is very poor and I never had a clue how and where I would be setting up the locale information. If anybody can point me in the right direction, I would appreciate that.

Given all that, I am surprised that nobody raises any concern about I18N. If anybody has developed a large scale web based application, that person knows that it's really painful to integrate I18N in a later stage because one has to go inside each file to find out where the text strings are and convert them to appropriate API calls. So it's always advised that I18N should be an important consideration at the beginning of the project. The worst is

puts [ "ant" , "bat" , "cat" ].to_sentence #=> "ant, bat, and cat"

Tell me that when I18N is in place, this API would write "and" in appropriate language. Because that is going to be undetectable in many web application!

1 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home