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.
# 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.قيمة = بداية اطبع("تم!")
Core Capabilities
Every design decision prioritizes letting programmers work in their native language without fragmenting the runtime or ecosystem.
Write pour chaque in French, 毎…中 in Japanese, or
لكل…في in Arabic. Localized keywords and built-in aliases work natively.
Surface → Lexer → Parser → Core AST → semantic checks → Python or WAT codegen. The same formal model powers every language frontend.
Add a new language by updating keyword registries and resources — not by rewriting the parser or code generator logic.
Start instantly with multilingual or multilingual repl,
switch languages live, and inspect generated Python, WAT, or Rust bridge output.
Import .ml modules across languages. A French module and an English
main file can run through the same execution pipeline.
First-class support for MPNumeral, UnicodeNumeral,
RomanNumeral, ComplexNumeral, and FractionNumeral types.
Architecture
Surface normalization maps alternate phrasing to canonical forms before entering the shared core — no duplicate logic, no fragmented runtimes.
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.
Supported Languages
Every supported language gets its own keyword model, operator aliases, and built-in name mappings — all backed by a shared keyword registry.
Quick Start
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.
$ python -m pip install --upgrade pip $ python -m pip install multilingualprogramming[wasm] $ python -m pip install multilingualprogramming[performance]
$ pipx install multilingualprogramming
# hello.ml print("Hello world") $ multilingual hello.ml $ multilingual run bonjour.ml --lang fr
$ multilingual $ multilingual repl --lang fr --show-python $ multilingual repl --lang ja --show-wat --show-rust
Advanced
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.
WATCodeGenerator lowers the core IR directly to executable
WebAssembly Text, including class methods and stateful OOP instances.
The project ships a browser playground that can execute programs, show generated Python, and inspect generated WAT/WASM output.
A Rust bridge and Cranelift-oriented path exist in the codebase, but the docs currently describe that track as planned rather than production-ready.
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
Public API
Import individual components for custom tooling, LLM-assisted translation workflows, or embedding the pipeline in your own applications.
MPNumeral, UnicodeNumeral, RomanNumeral,
ComplexNumeral, FractionNumeral, NumeralConverter — full numeric
type coverage.
KeywordRegistry and KeywordValidator expose the full
language-to-keyword mapping for inspection, tooling, and extension.
MPDate, MPTime, MPDatetime — locale-aware
temporal types with first-class multilingual support.
Lexer, Parser, AST nodes, and
SemanticAnalyzer — each stage is independently importable for custom analysis.
PythonCodeGenerator, RuntimeBuiltins,
ProgramExecutor, REPL, and WATCodeGenerator — embed the full
execution pipeline.
The data-driven registry model enables LLM-assisted code translation workflows — generate, validate, and execute multilingual code programmatically.
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.
Resources
Explore the official guides, experiment in the browser, and see complete projects written with the multilingual programming language in French.
Read the full guides, references, and architecture notes in the dedicated documentation site.
Try the language in your browser, inspect generated output, and iterate on examples without a local install.
A French-language project for exploring fractals with multilingual programming syntax.
A French-language cellular automata project published as cellcosmos.