From: Michael Neumann Date: 2004-05-24T02:12:51+09:00 Subject: Re: [Q] Ruby for educational purposes and localization On Mon, May 24, 2004 at 01:41:35AM +0900, Hal Fulton wrote: > gabriele renzi wrote: > >il Sun, 23 May 2004 13:53:59 +0200, Laurent Julliard > > ha scritto:: > > > > > >>So I started to think about a way by which one could define "synonyms" > >>for all Ruby reserved keywords in another language (e.g in French > >>"while" would be "tantque", "do" becomes "faire", etc...). All this > >>should be done while preserving the ability to require any existing > >>Ruby module written in plain english. > >> > >>I would be happy to start a discussion on that topic and welcome any > >>input on what the alternatives would be to do this? > > > > > >have you thought about writing a dumb wrapper around ruby that just > >does a gsub!(/word/,'mot') of the script and then pipes it into the > >real ruby? > > > > That sounds like a possibility. Another would be to build a "custom" > Ruby by editing the source and translating the keywords. I don't > think this is as hard as it sounds. That's really easy, just edit file "keywords" and rebuild the Ruby interpreter. I quickly tried this out by germanizing some keywords as shown below (note that it wasn't possible to build the full "ruby" executable easily this way, only miniruby): % miniruby wenn 1 == 1 dann puts "okay" ansonsten puts "falsch" ende BUT: Mixing different keyword languages is not possible in this way. Regards, Michael