Learning to Code in One’s Own Language

I recently published a paper with Sayamindu Dasgupta that provides evidence in support of the idea that kids can learn to code more quickly when they are programming in their own language.

Millions of young people from around the world are learning to code. Often, during their learning experiences, these youth are using visual block-based programming languages like Scratch, App Inventor, and Code.org Studio. In block-based programming languages, coders manipulate visual, snap-together blocks that represent code constructs instead of textual symbols and commands that are found in more traditional programming languages.

The textual symbols used in nearly all non-block-based programming languages are drawn from English—consider “if” statements and “for” loops for common examples. Keywords in block-based languages, on the other hand, are often translated into different human languages. For example, depending on the language preference of the user, an identical set of computing instructions in Scratch can be represented in many different human languages:

Examples of a short piece of Scratch code shown in four different human languages: English, Italian, Norwegian Bokmål, and German.

Although my research with Sayamindu Dasgupta focuses on learning, both Sayamindu and I worked on local language technologies before coming back to academia. As a result, we were both interested in how the increasing translation of programming languages might be making it easier for non-English speaking kids to learn to code.

After all, a large body of education research has shown that early-stage education is more effective when instruction is in the language that the learner speaks at home. Based on this research, we hypothesized that children learning to code with block-based programming languages translated to their mother-tongues will have better learning outcomes than children using the blocks in English.

We sought to test this hypothesis in Scratch, an informal learning community built around a block-based programming language. We were helped by the fact that Scratch is translated into many languages and has a large number of learners from around the world.

To measure learning, we built on some of our our own previous work and looked at learners’ cumulative block repertoires—similar to a code vocabulary. By observing a learner’s cumulative block repertoire over time, we can measure how quickly their code vocabulary is growing.

Using this data, we compared the rate of growth of cumulative block repertoire between learners from non-English speaking countries using Scratch in English to learners from the same countries using Scratch in their local language. To identify non-English speakers, we considered Scratch users who reported themselves as coming from five primarily non-English speaking countries: Portugal, Italy, Brazil, Germany, and Norway. We chose these five countries because they each have one very widely spoken language that is not English and because Scratch is almost fully translated into that language.

Even after controlling for a number of factors like social engagement on the Scratch website, user productivity, and time spent on projects, we found that learners from these countries who use Scratch in their local language have a higher rate of cumulative block repertoire growth than their counterparts using Scratch in English. This faster growth was despite having a lower initial block repertoire. The graph below visualizes our results for two “prototypical” learners who start with the same initial block repertoire: one learner who uses the English interface, and a second learner who uses their native language.

Summary of the results of our model for two prototypical individuals.

Our results are in line with what theories of education have to say about learning in one’s own language. Our findings also represent good news for designers of block-based programming languages who have spent considerable amounts of effort in making their programming languages translatable. It’s also good news for the volunteers who have spent many hours translating blocks and user interfaces.

Although we find support for our hypothesis, we should stress that our findings are both limited and incomplete. For example, because we focus on estimating the differences between Scratch learners, our comparisons are between kids who all managed to successfully use Scratch. Before Scratch was translated, kids with little working knowledge of English or the Latin script might not have been able to use Scratch at all. Because of translation, many of these children are now able to learn to code.


This blog post and the work that it describes is a collaborative project with Sayamindu Dasgupta. Sayamindu also published a very similar version of the blog post in several places. Our paper is open access and you can read it here. The paper was published in the proceedings of the ACM Learning @ Scale Conference. We also recently gave a talk about this work at the International Communication Association’s annual conference. We received support and feedback from members of the Scratch team at MIT (especially Mitch Resnick and Natalie Rusk), as well as from Nathan TeBlunthuis at the University of Washington. Financial support came from the US National Science Foundation.

8 Replies to “Learning to Code in One’s Own Language”

  1. This is a great study, thank you (both) for looking into it. In New Zealand, a similar idea has come up for Maori kids learning coding through modding [a popular Java game].

    It may be out of scope for what you’ve looked at, but I’m curious as to how you think this impacts whatever comes after Scratch. I’m on a team teaching Pygame to year 5 kids who have had several terms of Scratch, so it’s common for me to refer to concepts from Scratch whilst introducing the same concepts in Python. I’m wondering whether teaching kids the “wrong” keywords like if, else, click, pressed, and so on, sets them back a little when they graduate to the next English-based programming language.

    Then again, maybe it’s the concepts that Scratch teachs, more than the words, that matter, and losing the translation upon graduation is negligible.

    1. Hmm, now that you mention it, I see a similar difficulty for some to do the step from Scratch to a classic programming language (Python or something else)… the comparison helps, up to a point (also, for some less imaginative participants, it’s necessary to either have Scratch open in parallel to *show* the parallelities *and* demonstrate them in a runnable example, or better to completely ignore it).

  2. I quite disagree here.

    I learnt three programming languages before English (with a dab of Latin in between), and just learnt the words BASIC, Assembly and Pascal have as things-that-do-something without any connection to the English words they were based on (which, I notice now, incidentally helps me to not have the wrong connotations with it).

    At Teckids e.V. we also teach NXT robot programming in NXC, not a block language (while, on the other hand, we do occasionally use Scratch as a stepping stone to the pure-on-computer, less hands-on, Python game programming courses). The kids, even those not already knowing English, do not have any problem at all to grasp what few vocabulary there is.

    This objection is biased because our native language also uses the Latin alphabet. I would agree with the localisation approach for languages not using left-to-right-then-top-to-bottom writing order, and languages not using the Latin alphabet or something resembling it closely enough.

    1. Of course, our results might be wrong or misleading for lots of reasons that we can’t rule out. That said, I think it’s important to keep in mind that our results are not about what worked for you or what worked for the kids who attend the Techkids workshops. Our results are about what happened on average in our dataset of Scratch users and, in this dataset, kids who used localized interfaces learned slightly faster. It’s also worth keeping in mind that our results do not suggest that users of English interfaces don’t learn! Our results suggest that kids in our sample learn at a pretty similar rate when using English and localized interfaces in Scratch. As a result, we’re not suggesting that all kids will be stopped in their tracks. Our results suggest that the users of the the localized interfaces pick up blocks slightly quicker.

Leave a Reply

Your email address will not be published. Required fields are marked *