I've been reading all the tutorials and blog entries I can find on this subject but one idea I haven't seen floated yet is to do multilingual rails using what Rails is reallly quite good at database interaction. I've seen Sacha's gettext/po/mo idea (http://manuals.rubyonrails.com/read/chapter/105) and also an idea using .rb files by Per Wigren (http://www.tuxsoft.se/sv/oss/rails/multilingual) . Has anybody thought about trying to do it like Vbulletin: the code for putting the right languages on the page, according to user preference, is part of the application but the actual translation and languages are all done through the database, which makes it very easy for the administrator and translator to do their work. It would mean that to translate your app, you would just need to give the translator access to you translation tables interface and let him get on with it, saving directly into the database. More control, less hassle. In the database, there are language, phrase and even phrasegroup tables and then in the application they declare a global $vbphrase variable which is specified as $vbphrase[''here_goes_your_translated_phrase_reference_string'] in each place where it is necessary to output text. The user chooses one of the available languages and this is recorded in his user profile in the DB and thus remembered and can be changed whenever they want. People who are not registered can also change the language through a drop down on each page. They have it set up not just for the actual phrases, but also left to right issues, time and dates, even seperators for decimals and thousands. All the changeable stuff is stored in a database and the code interprets that. So, my 0.02â?¬ to the I18N ideas. If anybody likes the idea, I can dig out all the flows and code references from Vbullletin and we could see how we might apply it for rails.
on 2005-11-12 14:55
on 2005-11-12 15:25
Hi Matthew, this is already being worked on and will be released in the hopefully not so distant future. So hang tight. Sascha Ebach PS: If you search the archives you might find what I am talking about.
on 2005-11-12 18:18
Sacha, That's good news. I'll have a look in the archives. I would love to help out with this if I possibly could. It's one of the few areas where I feel I might have something to offer. :-) Matthew.
on 2006-05-11 21:45
might want to check out: http://wiki.rubyonrails.com/rails/pages/RailsLocalization at the bottom there are four solutions listed, but i don't think there is yet any real consensus on which is the best. Gloablize Localize GLoc Multilingual anyone here have any experience with these they'd like to share?
on 2006-05-11 21:54
Looking at the "multilingual" web page, it looks like a project that has died. It was an attempt to supersede the i18n/l10n paradigm. Warren