http://www.perlmonks.org?node_id=55268


in reply to Re: International Perl Resources
in thread International Perl Resources

Translating a computer language is a _very_ bad idea.

It has been done before, especially here in France. For a while I think the Ministery of Education was pushing a french translation of Pascal. Now that's something really (twice) useless! Seriously that's totally pointless. First "simplistic" English reads much better than simplistic French, and then when people have to maintain real-life code, written in a real, English-based language, then they are at a real disadvantage.

The English used in computer languages is simple enough that a couple of weeks of training is enough to feel at ease with it. And even the English used in Computer books, once you understand how compound words are built is usually pretty simple. I remember reading technical manuals _way_ before I was able to read even the simplest novel in English.

IMHO you should not waste your time, and above all the time of people who would use "translated" languages.

Replies are listed 'Best First'.
Re: Re: Re: International Perl Resources
by boo_radley (Parson) on Jan 31, 2001 at 01:38 UTC
    That'd be an interesting thing to see :
    utilisez le français ou mourez;

      Easy, you can write this (from the Camel 3 p. 280):

      #!/bin/perl -P #include "./francais.h" utilise strict; utilise Data::Dumper; mon %hdh; # mes, ma and mon are all like my tant_que (<>) { suivant sauf_si( r/^(.*?):\e*//); # r -> remplacer \e -> espace mon FFqui=FF1; # I do not have the Euro sign on m +y # keyboard so I used F(rench) F(ra +nc) pour mon FFchamp( separe) { mes( FFclef, FFvaleur)= separe /=/, FFchamp; FFhdh{FFqui}{FFclef}= FFvaleur; } } imprime Dumper( %hdh);

      Of course you need a francais.h file

      #define utilise use #define mon my #define ma my #define mes my #define tant_que while #define sauf_si unless #define separe split #define suivant next #define imprime print #define ouvre open #define meurt die #define pour for #define ou or #define execute() \ while( <DATA>) \ { $programme .= $_; } \ $programme=~ s{FF}{\$}g; \ $programme=~ s{r/}{s/}g; \ $programme=~ s{\\e}{\\s}g; \ eval( $programme) or die $@; execute(); __DATA__

      And then you can run it using an input file such as:

      pierreafeux: mari=frederic ami=barnabe femme=wilma animal_de_companie= +dino simpson: mari=omer femme=marjorie enfant=barthelemie dupont: mari=jean femme=marie enfant=pierre animal_de_companie=me +dor

      You will need to make this file executable, or run it with perl -P as you can't do just perl <file> and have the -P on the command line take-over properly.

      And I know it is not robust, especially the quick hacks to French-ize the regexp, ask Damian if you want a real French module!

      Update: I removed the display of the program and moved the execute(); call to the included file, it looks better now.

        Brilliance!