r/Python • u/Accomplished-Land820 • Dec 12 '25
Discussion Democratizing Python: a transpiler for non‑English communities (and for kids)
A few months ago, an 11‑year‑old in my family asked me what I do for work. I explained programming, and he immediately wanted to try it. But Python is full of English keywords, which makes it harder for kids who don’t speak English yet.
So I built multilang-python: a small transpiler that lets you write Python in your own language (French, German, Spanish… even local languages like Arabic, Ewe, Mina and so on). It then translates everything back into normal Python and runs.
# multilang-python: fr
fonction calculer_mon_age(annee_naissance):
age = 2025 - annee_naissance
retourner age
annee = saisir("Entrez votre année de naissance : ")
age = calculer_mon_age(entier(annee))
afficher(f"Vous avez {age} ans.")becomes standard Python with def, return, input, print.
🎯 Goal: make coding more accessible for kids and beginners who don’t speak English.
Repo: multilang-python
Note : You can add your own dialect if you want...
How do u think this can help in your community ?
25
u/Ok-Entertainment-286 Dec 12 '25
you are doing him a biiiiig disservice...
3
u/Accomplished-Land820 Dec 12 '25
Got u. My goal isn’t to keep kids away from real Python, but to lower the entry barrier. Once they grasp the logic in their own language, switching to English keywords becomes much easier.
We are not replacing the whole python programming language..
4
u/mrezar Dec 13 '25
I don't think the problem is keeping kids away from real python. I'd say the problem is not using their interest in programming as an opportunity to learn English.
I don't think everyone should know English, but if you are coding you probably should. It's going to come down to learning programming keywords in english sooner or later and this project makes it later, which I don't really see the point.
1
u/sylfy Dec 14 '25
I would actually call this a crutch. I would liken it to giving someone an agentic LLM as their first touch point with programming.
4
u/cym13 Dec 12 '25 edited Dec 12 '25
I've always heard (and believed) that learning any programming language makes learning a new one easier. Even if you consider that this is so far from python that it is a completely different language (despite the structure and logic of the program being preserved) this would not make learning real python later more difficult. It wouldn't be my first choice personally (I think children benefit from more exposure to foreign languages if anything) but calling it "a biiiiig disservice" is going too far IMHO.
1
u/ottawadeveloper Dec 12 '25
Disagree. This feature exists in other languages (EPL has four variants of syntax supported for example, English and three Chinese). Its been shown to help non-English speakers grasp programming concepts faster.
It's kinda like using Scratch or something to teach programming. You won't use it in the real world. But it makes the learning curve smoother and gentler.
-3
Dec 12 '25
How?
-2
u/CaptainFoyle Dec 12 '25
You wanna hire a python programmer who can only use it in French?
9
u/Big_Tomatillo_987 Dec 12 '25
OP made this for an 11 year old child, I would hope noone's talking about hiring them.
They have plenty of time to learn English yet (if they want to).
5
u/eddieantonio Dec 12 '25
OP, you should look at Hedy: https://hedy.org/ – somewhat similar goals of multilingual Python
3
2
u/Electronic-Duck8738 Dec 12 '25
Can it be used to translate own-language Python into English for reading, debugging, etc.? Or even, take English-language Python and translate it to an own-language version of the code?
2
u/Accomplished-Land820 Dec 12 '25
Right now multilang-python transpiles from other languages into standard Python (which is in english mostly). The reverse (English → own language) is possible too, just not implemented yet. Could be super useful for teaching/debugging.
Repo’s if u wanna contribute multilang-python
46
u/knobbyknee Dec 12 '25
In the long run, this is a terrible idea, which has been tried several times. For instance, there was BASICOIS, which was a French version of BASIC. There have been several other translations on top of English based programming languages. They all fail, because the keywords are a small part of the general context.
Word order will make things look clunky.
Will you translate all the exceptions and all the error messages?
Will you translate the standard library?
Will you translate all third party modules? There are close to 700 000 of them on Pypi.
If not, you will have a bewildering mixed environment that is much harder to learn than learning the English keywords.
I'm Swedish and make Swedish applications, but the way we do it is that we write a fully English based application. Then we translate the user interface to Swedish. This avoids the whole language switching problem while developing the application.
8
u/wolfenkraft Dec 12 '25
I’ve seen projects that could have worked fail because even if the code was in English all of the documentation wasn’t. I get it, English language hegemony sucks for some people but it’s also the closest thing to a universal language on the planet. It also shows an incredible lack of awareness to call a language like Arabic local. Or even lump all Arabic together, which I wouldn’t normally complain about but the whole point of this post is language inclusivity.
2
u/divad1196 Dec 13 '25
def also stands for definition in french, no need to change it. Any other function can be renamed
But ultimately, that's just a really bad idea. There are a few keywords to learn and nowadays AI will help you. So you don't even have to learn english. You will be limited very fast if you don't speak english anyway.
On the otherside, this dilute common effort and this is why I am not suportive of this kind of projects
2
u/Reasonable_Run_6724 Dec 14 '25
Dont understand all the negative comments, people forget that the point was to make young people who have trouble with english to try programming at early point. Not at all to create a python that will work at native language.
0
u/dissonantloos Dec 12 '25
That's cool man, nice work. Sounds to me like it really would lower the entry barrier!
1
u/Accomplished-Land820 Dec 12 '25
Thanks a lot! That's exactly the goal... lowering the barrier so kids and beginners can focus on the logic first. Appreciate the encouragement!
1
u/Bernd_ohne_Brot Dec 13 '25
Don't use it.
The kid should learn the english Python keywords. It will help the kid in the future.
-2
u/JEF_300 Dec 12 '25
This is really cool, especially for Arabic speakers. Getting kids to code without the English barrier first is a solid approach. Once they get the logic down, picking up the English keywords later becomes way easier.
Checked out the repo, clean work. Might be worth adding Darija or Algerian Arabic dialect support if you haven't already... would make it even more accessible for North African kids.
0
u/Accomplished-Land820 Dec 12 '25
Exactly! That's exactly the idea, help kids get the logic first, then English keywords are easy. When I was in Morocco, I noticed that everyone speaks Darija, so adding support for it would be a huge plus for accessibility. The challenge is that I don't personally understand Darija, which makes it tricky for me to implement. But that's exactly the beauty of open source: it's open to contributions from the community
-2
31
u/tdammers Dec 12 '25
Python isn't just full of English keywords, it's also full of language constructs that are based on English grammar. You can translate the keywords, but the grammar part will still be there.
Your sample code is actually illustrative of this issue. In English, the imperative and infinitive forms of all verbs are identical - in the phrases "get me a sandwich" and "I want you to get me a sandwich", the verb "get" uses the same form, but it's imperative in the first one, infinitive in the second. And most indicative forms are also identical to the infinitive: "you get me a sandwich", "I get myself a sandwich", "we all get sandwiches", it's all the same. The only exception (for most verbs) is the third person singular, which would be "gets" ("she gets a sandwich too").
Now when it comes to function names, we usually use this shared infinitive / imperative form, e.g. "calculate_my_age"; when defining the function, we think of it as infinitive ("to calculate my age (given birth year): do this"), but when we call the function, we think of it as imperative ("calculate my age (given this birth year)!"). This is fine in English, because it's the exact same verb form, but in French, this doesn't work - the infinitive is "calculer", but the imperative would be "calcule" (informal) or "calculez" (formal). To make the code feel natural, the language would have to be able to reflect this distinction somehow.
And that's just French, a language that has had centuries of mutual influence with English, and belongs to the same Indo-European language family; once you apply this idea to languages from other families, things get even weirder. English uses very few word alterations, and relies mostly on combining words in particular orders, to convey meaning, but languages like Finnish modify words a lot. A programming language modeled after something like Finnish would have to be radically different from the ground up, using prefixes and suffixes to combine building blocks into larger programs.
And what about writing systems? English can be written reasonably well using the Latin alphabet and a small set of extra characters, all of which are part of the ASCII character set, but this is quite obviously not true of most other languages. Cyrillic, Greek, and "extended Latin" scripts (using diacritics and a few language-specific extra letters such as ð or ß), are relatively straightforward, but it gets weirder when you have to take RTL scripts into account (like Arabic or Hebrew), and then you have abjads (scripts that primarily record consonants, and either ignore vowels altogether, or mark them with diacritics on the consonants), syllabaries (scripts that have a separate symbol for each possible syllable, like Japanese hiragana and katakana), logographic scripts (scripts that have one symbol for each morpheme, like Chinese characters or Japanese kanji), and featural writing systems (where symbols for sounds are composed out of smaller symbols describing their features, and those combined sound symbols are then again combined into symbols that represent syllables; the Korean Hangul script is the only known system for any natural language, though there exist similar writing systems for constructed languages). Most of these will introduce serious practical issues (e.g., what would Python code look like when written from right to left?), and some will require you to rethink how the language itself works.
Calling Arabic, a language with over 400 million native speakers and official status in 28 countries and territories, a "local language", and German (95 million native speakers, official status in 6 countries of which only 4 have populations of more than a million, and among those, only 3 have native German-speaking populations of more than a million) "not a local language" is kind of weird...
Long story short - English permeates the design of most modern programming languages, and this runs much deeper than just the choice of keywords, so I think that by just translating the keywords, you are doing those other natural languages a disservice, and you're not helping the learners at all - it just makes it harder to develop a good linguistic intuition for the language, because now you still have to learn the relevant bits of English grammar, but you have to do it in the context of a language that isn't English. Imagine utiliser Français mots avec Anglias grammatique - il seulement faitpas travailler.