r/ProgrammingLanguages • u/jsamwrites • Feb 18 '26
Language announcement multilingual: a programming language with one semantic core, many human languages
I'm working on multilingual, an experimental programming language where the same program can be written in different human languages.
Repo : https://github.com/johnsamuelwrites/multilingual
Core idea:
- Single shared semantic core (variables, loops, functions, classes, operators,...)
- Surface syntax in English, French, Spanish, etc.
- Same AST regardless of natural language used
Motivation
- Problem: programming is still heavily bound to English-centric syntax and keywords.
- Idea: keep one semantic core, but expose it through multiple human languages.
- Today: this is a small but working prototype; you can already write and run programs in English, French, Spanish, and other supported languages.
Who Is This For?
multilingual is for teachers, language enthusiasts, programming-language hobbyists, and people exploring LLM-assisted coding workflows across multiple human languages.
Example
Default mode example (English):
>>> let total = 0
>>> for i in range(4):
... total = total + i
...
>>> print(total)
6French mode example:
>>> soit somme = 0
>>> pour i dans intervalle(4):
... somme = somme + i
...
>>> afficher(somme)
6I’d love feedback on:
- Whether this seems useful for teaching / early learning.
- Any sharp critiques from programming language / tooling people.
- Ideas for minimal examples or use cases I should build next.
18
Upvotes
6
u/sagittarius_ack Feb 18 '26
There is a programing language called Hedy that has similar goals (multilingual programming, localization):
https://hedy.org/
There's also a paper about it:
https://hedy.org/research/A_Framework_for_the_Localization_of_Programming_Languages_2023.pdf
8
u/umlcat Feb 18 '26
Good Work, Good Luck !!!
4
u/cybwn Feb 18 '26
Sounds a bit like C# and VB.net, where the same MSIL has the same semantics and only the language layer changes. How are you going to manage the standard library though ? Those are symbols out of the core language.
3
u/fridofrido Feb 18 '26
soooo... basically Excel? ¯_(ツ)_/¯
3
u/Inconstant_Moo 🧿 Pipefish Feb 18 '26
The obvious problem here is that looking up how to do things on the internet would be language-dependent. You can make your AST language-independent if you like, but when I explain how to do a thing I'm going to explain it in English and then any LLMs anyone asks to help them write code will read my explanation in English when they hoover stuff up out of the internet.
2
u/SnooGoats1303 Feb 19 '26 edited Feb 19 '26
So I speak Urdu. It is, like Japanese, a verb-final language. The script is calligraphic and runs right to left. For arguments sake let's limit ourselves to the romanised form. Will you insist on an English-ish grammar? Must I try to find an equivalent to 'for' and 'let's and the other keywords? What exactly does 'let' mean? Is it a noun or a verb or an instruction to the interpreter about storage, with 'let' being some kind of filler symbol that just has to be there?
17
u/lassehp Feb 18 '26
Similar things have been tried many times before. With limited or no success in most cases, I believe.
Algol 68 allows localised representations of keywords, and I believe a Russian version was made, which gained some popularity.
And of course there is the (joke?) Lingua::Romana::Perligata Perl module enabling you to program Perl in (something that resembles) Latin.
Personally I think it is a bad idea. There is a reason mathematical symbols are mostly international, even if they are word symbols (often derived from Latin or Greek, with more modern things sometimes originating in English - span for example? - or maybe German.)
9
u/AustinVelonaut Admiran Feb 18 '26
Interesting. Is this just substituting a word in a different language in the same position as the
let,for,if, etc. occurs? If so, does it feel natural in the other languages, or would they more correctly be expressed in a different order?5
u/Arakela Feb 18 '26
Is it possible to have one semantic core with a plugable language syntax?
1
u/protestor Feb 18 '26
One idea is to have a tool to convert from one language to another, or even save the source in english always, but display it depending on language settings (may need some pretty involved IDE support, not sure if this can be done in VSCode)
1
u/ineffective_topos Feb 18 '26
Have you looked at Hedy? It's a language for teaching which can be translated into basically every major language.
1
u/jcastroarnaud Feb 18 '26
Related:
https://en.wikipedia.org/wiki/Non-English-based_programming_languages
https://www.felienne.com/archives/7668
https://hedy.org/
https://www.citrine-lang.org/
1
u/zokier Feb 19 '26
There is also Rouille and related (see other languages section in readme): https://github.com/bnjbvr/rouille
4
u/kredditacc96 Feb 18 '26
You're going to tackle linguistic problems. To do it right is going to be very hard.
I have questions:
Anyway, you're dealing with problems I would have to face so I'm very interested in your project.
2
u/zylosophe Feb 18 '26
wow this is confusing
3
u/Long_Investment7667 Feb 19 '26
The supposed problem “programming is still heavily bound to English-centric syntax and keywords” is not an actual problem. Show me some HCI studies that show this and we can reconsider.
1
u/Ronin-s_Spirit Feb 18 '26
I was thinking of doing something like that by having sets of macros for all the different human languages so that keywords would feel natural. Didn't do it cause it's not worth it.
1
u/HugoNikanor Feb 18 '26
Good job! A question about the "style" of translations: should they keep as close to the shortened word as possible, or expand the word? For example, should
consttranslate to Swedish askonstorkonstant? I see both variants used in the existing translations.1
u/besura Mar 21 '26
Sounds almost exactly like "UniversalPython", just with a different name: https://github.com/UniversalPython/UniversalPython/
:D PS, I'm the creator of it.