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.
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.
Matthew-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org
2005-Nov-12 17:18 UTC
Re: RE: multilingual rails
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. -- Posted via http://rforum-demo.andreas-s.net/.
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? -- Posted via http://www.ruby-forum.com/.