gabriele renzi wrote: > il Sun, 23 May 2004 13:53:59 +0200, Laurent Julliard > <laurent__no__ / __spam__moldus.org> 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? This is one possible scenario although there is always the risk of changing words that are in normal strings. Another point is that ideally this should be made transparent and the "localized" ruby file should first require a specific module which does the processing before ruby evaluates the rest of the file. Is this possible? e.g. something like ------------------------------------- require 'french_ruby' i = 0 tantque i < 5 affiche i fin ------------------------------------- would be transparently transformed internally into this before it is executed ------------------------------------- i = 0 while i < 5 print i end ------------------------------------- Laurent