Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Just another Perl shrine
 
PerlMonks  

Re^3: Writting Perl reserved words in Spanish or other foreign languages

by neptuneray (Sexton)
on Jan 18, 2009 at 21:33 UTC ( #737181=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Writting Perl reserved words in Spanish or other foreign languages
in thread Writting Perl reserved words in Spanish or other foreign languages

I know I'm over a year late, but this application just came up in some consulting work. I believe it to be a GOOD idea to have a utility (or pre-processor) that accepts Perl keywords in Spanish. Anything that HELPS an inner-city Hispanic kid learn about computer programming is a Very Good Thing, indeed. The goal is to learn how to think algorithmically, not struggle with the English language (what's "croak" in Spanish? Please do not give me the word for "die" ...).

I disagree with the argument that it is a "waste of time" for the kids, and an "equivalent to teaching Pascal", which they will never use in the "real world" (BTW, where IS that place?). I learned Pascal very early on, never used it professionally (PL/1 was the closest), but I am thankful of the Pascal experience (Damian Conway did an excellent webcast on this subject and Perl6). In fact, I wish that there never WAS a working Pascal compiler, but that the language concept was taught in school nevertheless.

My German friends use English reserved words, but German variable names and comments. So why not have a translator that converts the entire Perl script (but I'd be happy with just the reserved words and Standard Library names)?

Since I have never written a parser, and have limited experience in Spanish, I searched for such a thing, but only found sources for Perl language TRAINING in foreign languages. I'm new around here, so I might have overlooked something. Does anyone know of such a thing?

Thanks, Ray


Comment on Re^3: Writting Perl reserved words in Spanish or other foreign languages
Re^4: Writting Perl reserved words in Spanish or other foreign languages
by TGI (Vicar) on Jan 19, 2009 at 19:54 UTC

    The big problem with source filters is that they can break easily. As long as you are using for introductory purposes, though, I think such a filter would be fine.

    Your best bet if you want to try this is to code up an attempt at a Spanish filter. Install Filter::Simple, make a list of keywords, use a dictionary to come up with a start on the replacements, then talk to an interested native speaker to fine tune your list, then throw something together.

    Take a look at the source of Acme::Lingua::Pirate::Perl&emdash;Filter::Simple does the hard work for you, all you have to do is provide the transformations. The start I provided above should only need more transformations added to make it useful. Not that I consider what I did as significant, but please consider it public domain and use it as you will.

    If you are thinking about working with younger kids, you might want to look at using Scratch in Spanish.


    TGI says moo

      TGI,

      Thanks so much for your understanding of my problem and your help. I've taken a look at this, and I think that it is something I can handle with my knowledge of Perl. I just needed a place to get started without re-inventing the wheel.

      These kids are a bit older, so Scratch won't help.

      Funnily enough, I happen to be dating a woman fluent in Spanish, and she has agreed to help. She is not computer literate, which is ideal in this case.

      When I have something decent, I will report back.

      Ray

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://737181]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-04-19 06:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (478 votes), past polls