Now on PyPI — multilingualprogramming v0.4

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 a single formal core with one unified execution pipeline.

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
Formal Core
Pipeline Steps
.ml
File Extension
GPLv3
Open Source License

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 codegen → Runtime. The same unified flow for 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 the interactive REPL instantly, switch languages live with :language fr, inspect keywords with :kw, and execute line-by-line.

🔀

Cross-Language Modules

Import .ml modules written in one language from another. A French module and an English main file work together seamlessly.

🔢

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.

pip install (recommended)
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install multilingualprogramming
pipx (isolated CLI)
$ pipx install multilingualprogramming
run a .ml file
# hello.ml
print("Hello world")

$ multilingual run hello.ml
$ multilingual run bonjour.ml --lang fr
start the REPL
$ multilingual repl
$ multilingual repl --lang fr
$ multilingual repl --lang ja --show-python
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.
WASM-ready.

The architecture targets multiple backends. The WASM infrastructure adds a Rust intermediate representation compiled through Cranelift — bringing near-native performance and browser-deployable execution.

🦀
Rust Intermediate

AST lowers to Rust-style IR before Cranelift compilation, enabling aggressive optimization passes.

🌐
Browser Deployable

WASM binaries run in any modern browser — enabling in-browser multilingual programming environments.

📦
Standard Library (17 langs)

The full localized stdlib ships alongside WASM output — localized builtins work at native speed.

WASM Architecture
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

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, and REPL — 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.