Misc #12722
closed
Added by vasilakisfil (Filippos Vasilakis) almost 8 years ago.
Updated almost 8 years ago.
Description
I would like to teach Ruby in kids. However, the kids I am aiming for don't speak English and their age is below 10. Is there a way I can localize Ruby reserved words and errors? in theory it shouldn't be that difficult, in practice I don't know how much work it is.
Thank you.
To change "reserved words", you have to modify (or add) defs/keywords
file and rebuild.
And if your words contain non-US-ASCII characters, you have to remove mb == ENC_CODERANGE_7BIT
condition from parse_ident()
in parse.y
too.
Is that really necessary? Sure, the keywords are derived from English, but they aren't English, they are Ruby. class
is an English word, but it has a very specific meaning in Ruby. In fact, I wouldn't be surprised to find out that it actually helps learning Ruby if you simply treat the keywords as nonsense gibberish and don't have any preconceived notions about what they should mean.
And besides, it's not just the 40 or so keywords, it's also the dozens, hundreds, thousands of predefined constants, globals, and methods just in the core library, let alone the entire standard libraries (where you will also have to change all directory and file names and the corresponding require
calls, I mean απαιτώ
calls).
Thanks! I played a bit with the keywords but I figured out that indeed it's kind of difficult to localize the entire thing (i.e. kernel methods etc) given that the compiler was not built with internationalization in mind (which makes sense..). Thank you!
- Status changed from Open to Third Party's Issue
Would you mind if I close this ticket?
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0