DEV Community

Cover image for We Built a Programming Language That Speaks 8 Human Languages
Z- language
Z- language

Posted on

We Built a Programming Language That Speaks 8 Human Languages

The Problem

4.5 billion people don't speak English fluently. Yet every mainstream programming language — Python, JavaScript, Java — forces you to learn English keywords before writing your first line of code.

For a 12-year-old in São Paulo, Mumbai, or Beijing, if, while, and function are foreign words. They have to learn a new human language before they can learn computational thinking.

The Solution: Zuse

Zuse is a programming language where you code in your native language. The same program in 4 languages:

German:

WENN alter >= 18 DANN
    AUSGABE "Willkommen!"
ENDE WENN
Enter fullscreen mode Exit fullscreen mode

English:

IF age >= 18 THEN
    PRINT "Welcome!"
END IF
Enter fullscreen mode Exit fullscreen mode

Hindi:

अगर उम्र >= 18 तो
    दिखाओ "स्वागत है!"
अंत अगर
Enter fullscreen mode Exit fullscreen mode

Chinese:

如果 年龄 >= 18 则
    输出 "欢迎!"
结束 如果
Enter fullscreen mode Exit fullscreen mode

All four compile to the exact same AST. Then Zuse transpiles to Python, JavaScript, Java, C#, or WebAssembly.

How It Works

The architecture is surprisingly simple:

8 Human Languages → Lexer → Canonical AST → 5 Backends
Enter fullscreen mode Exit fullscreen mode

Keywords are loaded from external JSON config files. The parser and interpreter only see canonical tokens. Adding a new language is literally adding a JSON file.

Example (hindi.json):

{
    "KW_WENN": "अगर",
    "KW_DANN": "तो",
    "KW_SONST": "वरना",
    "KW_AUSGABE": "दिखाओ"
}
Enter fullscreen mode Exit fullscreen mode

It's Not a Toy

Zuse includes:

  • Full OOP — Classes, inheritance, polymorphism
  • Error handling — Try/catch
  • Lambda functions — Anonymous functions
  • 2D Game Engine — Sprites, collision detection, 60fps game loop
  • Turtle Graphics — Draw fractals and stars
  • IDE — Syntax highlighting, debugger with breakpoints
  • LSP Server — VS Code integration
  • Package Manager — Install and share Zuse packages
  • 1086+ automated tests

The "God Mode"

Because Zuse runs on Python, you can import any Python library:

BENUTZE pandas ALS pd
daten = pd.read_csv("data.csv")
AUSGABE daten.describe()
Enter fullscreen mode Exit fullscreen mode

This means a student learns with AUSGABE and SCHLEIFE, and the same day they can analyze real data with pandas or build charts with matplotlib.

Named After a Pioneer

The name comes from Konrad Zuse, who built the Z3 in 1941 — the world's first functional programmable computer — and designed Plankalkül, the first high-level programming language.

His philosophy of simplicity guides this project:

"Because 'simple' is simply simple."

Try It

Currently supports: 🇩🇪 German, 🇬🇧 English, 🇪🇸 Spanish, 🇫🇷 French, 🇮🇹 Italian, 🇵🇹 Portuguese, 🇮🇳 Hindi, 🇨🇳 Chinese

I'd love your feedback. What language should we add next? 🌍

Zuse auf GitHub ausprobieren & Stern dalassen ⭐

Top comments (0)