An interpreter that lets you write and run code in your mother language.
Proving that computers have no linguistic limits -- binary is universal.
MotherTongue is a programming language interpreter that maps native-language keywords to programming constructs. Instead of writing if, print, while in English, you write them in Hindi, Bengali, Tamil, Telugu, or any language -- and the interpreter executes your code.
चर नाम = "दुनिया"
लिखो("नमस्ते, " + नाम)
अगर 10 > 5:
लिखो("MotherTongue काम कर रहा है")
Output:
नमस्ते, दुनिया
MotherTongue काम कर रहा है
Requirements: Python 3.8+
# Clone the repository
git clone https://github.com/Jaidevstudio/MotherTongue.git
cd MotherTongue
# List available languages
python mothertongue.py --list
# Run the Hindi example
python mothertongue.py --lang hindi --file languages/hindi/hello.mt
# Run inline code
python mothertongue.py --lang hindi --code 'लिखो("नमस्ते")'
# Debug mode (show tokens)
python mothertongue.py --lang hindi --code 'लिखो("test")' --tokens| Feature | Hindi Keyword | What It Does |
|---|---|---|
लिखो |
Output text to the screen | |
| Variable | चर |
Declare and assign a variable |
| If | अगर |
Conditional execution |
| Else | नहींतो |
Alternative branch |
| While | जबतक |
Loop while condition is true |
| For | हरएक |
Iterate over a range |
| True / False | सच / झूठ |
Boolean values |
| Arithmetic | + - * / % |
Math operations |
| Comparison | बराबर, >, < |
Compare values |
| String concat | + |
Join strings together |
MotherTongue/
src/
engine.py # Language loader
lexer.py # Tokenizer (converts source to tokens)
interpreter.py # Executes tokenized code
languages/
hindi/ # Hindi -- implemented
lang.json # Keyword mappings
hello.mt # Example program
bengali/ # Bengali -- awaiting contributor
tamil/ # Tamil -- awaiting contributor
telugu/ # Telugu -- awaiting contributor
marathi/ # Marathi -- awaiting contributor
gujarati/ # Gujarati -- awaiting contributor
kannada/ # Kannada -- awaiting contributor
malayalam/ # Malayalam -- awaiting contributor
punjabi/ # Punjabi -- awaiting contributor
urdu/ # Urdu -- awaiting contributor
odia/ # Odia -- awaiting contributor
assamese/ # Assamese -- awaiting contributor
spanish/ # Spanish -- awaiting contributor
french/ # French -- awaiting contributor
arabic/ # Arabic -- awaiting contributor
japanese/ # Japanese -- awaiting contributor
chinese/ # Chinese -- awaiting contributor
template/ # Template for new languages
tests/
test_hindi.py # Test suite
mothertongue.py # CLI entry point
This is where you come in. Each language folder is independent -- you can contribute your language without touching anyone else's work.
-
Fork this repository
-
Navigate to
languages/your-language/(e.g.,languages/bengali/) -
Copy the template:
cp languages/template/lang.json languages/bengali/lang.json
-
Translate each keyword in
lang.jsonto your language:{ "name": "Bengali", "code": "bn", "script": "Bengali", "keywords": { "print": "লেখো", "variable": "চলক", "if": "যদি", "else": "নাহলে" } } -
Write a hello world example as
hello.mt:চলক নাম = "পৃথিবী" লেখো("নমস্কার, " + নাম) -
Test your language:
python mothertongue.py --lang bengali --file languages/bengali/hello.mt
-
Submit a pull request
| Language | Script | Status | Contributor |
|---|---|---|---|
| Hindi | Devanagari | Implemented | @VasudevJaiswal |
| Bengali | Bengali | Awaiting contributor | -- |
| Tamil | Tamil | Awaiting contributor | -- |
| Telugu | Telugu | Awaiting contributor | -- |
| Marathi | Devanagari | Awaiting contributor | -- |
| Gujarati | Gujarati | Awaiting contributor | -- |
| Kannada | Kannada | Awaiting contributor | -- |
| Malayalam | Malayalam | Awaiting contributor | -- |
| Punjabi | Gurmukhi | Awaiting contributor | -- |
| Urdu | Nastaliq | Awaiting contributor | -- |
| Odia | Odia | Awaiting contributor | -- |
| Assamese | Bengali | Awaiting contributor | -- |
| Spanish | Latin | Awaiting contributor | -- |
| French | Latin | Awaiting contributor | -- |
| Arabic | Arabic | Awaiting contributor | -- |
| Japanese | Hiragana/Katakana | Awaiting contributor | -- |
| Chinese | Hanzi | Awaiting contributor | -- |
Your language not listed? Create a new folder under languages/ and submit a PR. Any language in the world is welcome.
Source Code (.mt)
|
v
[Lexer] Tokenizes source using language-specific keyword maps
| Handles Unicode scripts (Devanagari, Bengali, Tamil, etc.)
v
[Tokens] KEYWORD, IDENTIFIER, NUMBER, STRING, OPERATOR, etc.
|
v
[Interpreter] Tree-walking interpreter
| Executes statements: print, variables, if/else, loops
v
[Output] Results printed to console
- Core interpreter engine (lexer, parser, interpreter)
- Hindi language support
- CLI tool for running .mt files
- Per-language folder structure for easy contribution
- Add more Indian languages (Bengali, Tamil, Telugu, Marathi...)
- Add international languages (Spanish, French, Arabic, Japanese...)
- Functions and return values
- Arrays and loops over collections
- REPL (interactive mode)
- Web playground (try MotherTongue in the browser)
- VS Code extension for syntax highlighting
Language is identity. Technology should not force anyone to abandon their mother tongue to write code. This project is proof that binary is universal -- and so is every language on Earth.
Built by the Jaidevstudio community