multilingualprogramming v0.6.0 — Python + WAT/WASM + OOP

One Model.
Many Languages.

Write code in your native tongue.

A multilingual programming language where you write in English, French, Japanese, Arabic, Hindi, and more — all compiling into one formal core with Python and WAT/WASM execution paths.

Install Now View on GitHub PyPI Package
English Français 日本語 Español العربية
# hello.ml — English frontend
let name = "World"

def greet(person):
    return f"Hello, {person}!"

for i in range(3):
    print(greet(name))

class Counter:
    def __init__(self, start):
        self.value = start

print("Done!")
# bonjour.ml — Frontend français
soit nom = "Monde"

déf saluer(personne):
    retour f"Bonjour, {personne}!"

pour i dans intervalle(3):
    afficher(saluer(nom))

classe Compteur:
    déf __init__(self, depart):
        self.valeur = depart

afficher("Terminé!")
# こんにちは.ml — 日本語フロントエンド
変数 名前 = "世界"

関数 挨拶():
    戻る f"こんにちは、{人}!"

 i  範囲(3):
    表示(挨拶(名前))

クラス カウンタ:
    関数 __init__(self, 開始):
        self.値 = 開始

表示("完了!")
# hola.ml — Frontend en español
sea nombre = "Mundo"

def saludar(persona):
    retornar f"¡Hola, {persona}!"

para i en rango(3):
    imprimir(saludar(nombre))

clase Contador:
    def __init__(self, inicio):
        self.valor = inicio

imprimir("¡Listo!")
# مرحبا.ml — الواجهة العربية
دع الاسم = "العالم"

دالة تحية(شخص):
    أرجع f"مرحباً، {شخص}!"

لكل i في نطاق(3):
    اطبع(تحية(الاسم))

صنف عداد:
    دالة __init__(self, بداية):
        self.قيمة = بداية

اطبع("تم!")
17
Human Languages
1,937
Tests
41
Localized Builtins
0.6.0
Current Version
3.12+
Python Required

Built for language inclusion,
not as an afterthought.

Every design decision prioritizes letting programmers work in their native language without fragmenting the runtime or ecosystem.

🌐

Language-Inclusive Syntax

Write pour chaque in French, 毎…中 in Japanese, or لكل…في in Arabic. Localized keywords and built-in aliases work natively.

Single Execution Pipeline

Surface → Lexer → Parser → Core AST → semantic checks → Python or WAT codegen. The same formal model powers every language frontend.

🔌

Data-Driven Extensibility

Add a new language by updating keyword registries and resources — not by rewriting the parser or code generator logic.

💬

REPL-First Experience

Start instantly with multilingual or multilingual repl, switch languages live, and inspect generated Python, WAT, or Rust bridge output.

🔀

Cross-Language Modules

Import .ml modules across languages. A French module and an English main file can run through the same execution pipeline.

🔢

Multi-Script Numerals

First-class support for MPNumeral, UnicodeNumeral, RomanNumeral, ComplexNumeral, and FractionNumeral types.

One pipeline.
Every language.

Surface normalization maps alternate phrasing to canonical forms before entering the shared core — no duplicate logic, no fragmented runtimes.

✍️
Source .ml
17 languages
🔤
Lexer
Tokenization
🌳
Parser → AST
Abstract syntax
🔬
Semantic
Type & scope checks
⚙️
Python Codegen
Transpilation
🚀
Runtime
Execution
🔄
Surface Normalization Layer

A declarative normalization layer maps alternate phrasings (pour chaque i dans, 毎 i 中) to canonical forms before parsing. This keeps the grammar clean and enables natural language variation per locale without grammar explosion.

17 languages.
One codebase.

Every supported language gets its own keyword model, operator aliases, and built-in name mappings — all backed by a shared keyword registry.

en
English
English
print("Hello")
fr
French
Français
afficher("Bonjour")
es
Spanish
Español
imprimir("Hola")
de
German
Deutsch
drucken("Hallo")
it
Italian
Italiano
stampa("Ciao")
pt
Portuguese
Português
imprimir("Olá")
ja
Japanese
日本語
表示("こんにちは")
zh
Chinese
中文 (简体)
打印("你好")
ar
Arabic
العربية
اطبع("مرحبا")
hi
Hindi
हिन्दी
प्रिंट("नमस्ते")
bn
Bengali
বাংলা
প্রিন্ট("হ্যালো")
ta
Tamil
தமிழ்
அச்சிடு("வணக்கம்")
pl
Polish
Polski
wydrukuj("Cześć")
nl
Dutch
Nederlands
druk("Hallo")
sv
Swedish
Svenska
skriv("Hej")
da
Danish
Dansk
udskriv("Hej")
fi
Finnish
Suomi
tulosta("Hei")

Up and running
in 60 seconds.

Install from PyPI, write a .ml file in your language, and run it. Requires Python 3.12 or newer. Optional extras enable the WAT/WASM toolchain.

pip install (recommended)
$ python -m pip install --upgrade pip
$ python -m pip install multilingualprogramming[wasm]
$ python -m pip install multilingualprogramming[performance]
pipx (isolated CLI)
$ pipx install multilingualprogramming
run a .ml file
# hello.ml
print("Hello world")

$ multilingual hello.ml
$ multilingual run bonjour.ml --lang fr
start the REPL
$ multilingual
$ multilingual repl --lang fr --show-python
$ multilingual repl --lang ja --show-wat --show-rust
multilingual repl — interactive session
>>> let total = 0 >>> for i in range(4): ... total = total + i ... >>> print(total) 6 >>> :language fr Switched to: French (fr)
>>> soit somme = 0 >>> pour i dans intervalle(4): ... somme = somme + i ... >>> afficher(somme) 6 >>> :kw fr pour, soit, déf, retour, classe, si, sinon...
>>> 変数 合計 = 0 >>> 毎 i 中 範囲(4): ... 合計 = 合計 + i ... >>> 表示(合計) 6 >>> :ops ja かつ, または, ない, 真, 偽, なし...

Modern runtime.
WAT/WASM-ready.

The architecture targets multiple backends. The production-ready WASM path lowers the multilingual core to WAT for browser and Wasmtime execution, while the Rust/Cranelift path remains scaffolded for future work.

🦀
WAT Path First

WATCodeGenerator lowers the core IR directly to executable WebAssembly Text, including class methods and stateful OOP instances.

🌐
Browser Playground

The project ships a browser playground that can execute programs, show generated Python, and inspect generated WAT/WASM output.

📦
Rust/Cranelift Roadmap

A Rust bridge and Cranelift-oriented path exist in the codebase, but the docs currently describe that track as planned rather than production-ready.

WAT / WASM Architecture
Source .ml (17 langs)
       │
       ▼
Lexer + Parser
       │
       ▼
Core AST / Core IR
       │
   ┌───┴────┐
   ▼        ▼
Python   WAT
Codegen  Codegen
            │
            ▼
      wat2wasm / wabt
            │
            ▼
 Browser / Wasmtime
            │
            ▼
  Stable WASM path

Rust / Cranelift path: planned

"Language-inclusive authoring without fragmenting
runtime behavior."

— The multilingual programming philosophy

Building blocks
you can use.

Import individual components for custom tooling, LLM-assisted translation workflows, or embedding the pipeline in your own applications.

🔢

Numeral Types

MPNumeral, UnicodeNumeral, RomanNumeral, ComplexNumeral, FractionNumeral, NumeralConverter — full numeric type coverage.

🗝️

Keyword Registry

KeywordRegistry and KeywordValidator expose the full language-to-keyword mapping for inspection, tooling, and extension.

📅

Date & Time

MPDate, MPTime, MPDatetime — locale-aware temporal types with first-class multilingual support.

🌳

Frontend Pipeline

Lexer, Parser, AST nodes, and SemanticAnalyzer — each stage is independently importable for custom analysis.

🏃

Runtime

PythonCodeGenerator, RuntimeBuiltins, ProgramExecutor, REPL, and WATCodeGenerator — embed the full execution pipeline.

🤖

LLM Workflows

The data-driven registry model enables LLM-assisted code translation workflows — generate, validate, and execute multilingual code programmatically.

Start coding
in your language.

Install multilingual in seconds and write your first program in your native tongue. All 17 language frontends ship in the same package, with optional extras for WASM workflows.

Documentation, playground,
and French projects.

Explore the official guides, experiment in the browser, and see complete projects written with the multilingual programming language in French.

📘

Documentation

Read the full guides, references, and architecture notes in the dedicated documentation site.

multilingualprogramming.github.io/docs/

github.com/multilingualprogramming/docs

🧪

Playground

Try the language in your browser, inspect generated output, and iterate on examples without a local install.

multilingualprogramming.github.io/playground/

github.com/multilingualprogramming/playground

🌀

Fractales

A French-language project for exploring fractals with multilingual programming syntax.

multilingualprogramming.github.io/fractales/

github.com/multilingualprogramming/fractales

🧫

Cellular Automata

A French-language cellular automata project published as cellcosmos.

multilingualprogramming.github.io/cellcosmos/

github.com/multilingualprogramming/cellcosmos