Write code in your native tongue.
A multilingual programming language where you write in English, French, Japanese, Arabic, Hindi, and more — all compiling into a single formal core with one unified execution pipeline.
# 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 codegen → Runtime. The same unified flow for every language frontend.
Add a new language by updating keyword registries and resources — not by rewriting the parser or code generator logic.
Start the interactive REPL instantly, switch languages live with
:language fr, inspect keywords with :kw, and execute line-by-line.
Import .ml modules written in one language from another. A French
module and an English main file work together seamlessly.
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.
$ python3 -m venv .venv $ source .venv/bin/activate $ pip install multilingualprogramming
$ pipx install multilingualprogramming
# hello.ml print("Hello world") $ multilingual run hello.ml $ multilingual run bonjour.ml --lang fr
$ multilingual repl $ multilingual repl --lang fr $ multilingual repl --lang ja --show-python
Advanced
The architecture targets multiple backends. The WASM infrastructure adds a Rust intermediate representation compiled through Cranelift — bringing near-native performance and browser-deployable execution.
AST lowers to Rust-style IR before Cranelift compilation, enabling aggressive optimization passes.
WASM binaries run in any modern browser — enabling in-browser multilingual programming environments.
The full localized stdlib ships alongside WASM output — localized builtins work at native speed.
Source .ml (17 langs) │ ▼ Lexer + Parser │ ▼ AST (Core) │ ┌───┴────┐ ▼ ▼ Python WASM Codegen Codegen │ ▼ Rust IR │ ▼ Cranelift │ ▼ .wasm Binary
"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, and REPL — 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.