Skip to content

About

MotherTongue_Connect_To_World: I’m dreaming of making an interpreter for all mother languages, thinking and trying to connect every tongue globally

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

MotherTongue Connect To World

Stars Forks Issues License

An interpreter that lets you write and run code in your mother language.
Proving that computers have no linguistic limits -- binary is universal.


What is MotherTongue?

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.

Example: Hello World in Hindi

चर नाम = "दुनिया"
लिखो("नमस्ते, " + नाम)

अगर 10 > 5:
    लिखो("MotherTongue काम कर रहा है")

Output:

नमस्ते, दुनिया
MotherTongue काम कर रहा है


Quick Start

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


Supported Features

Feature Hindi Keyword What It Does
Print लिखो 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


Project Structure

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


How to Contribute a Language

This is where you come in. Each language folder is independent -- you can contribute your language without touching anyone else's work.

Step-by-step

  1. Fork this repository

  2. Navigate to languages/your-language/ (e.g., languages/bengali/)

  3. Copy the template:

    cp languages/template/lang.json languages/bengali/lang.json
  4. Translate each keyword in lang.json to your language:

    {
      "name": "Bengali",
      "code": "bn",
      "script": "Bengali",
      "keywords": {
        "print": "লেখো",
        "variable": "চলক",
        "if": "যদি",
        "else": "নাহলে"
      }
    }
  5. Write a hello world example as hello.mt:

    চলক নাম = "পৃথিবী"
    লেখো("নমস্কার, " + নাম)
    
  6. Test your language:

    python mothertongue.py --lang bengali --file languages/bengali/hello.mt
  7. Submit a pull request

Language Status

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.



Architecture

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


Roadmap

  • 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


Vision

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.


Join Discord

Built by the Jaidevstudio community

About

MotherTongue_Connect_To_World: I’m dreaming of making an interpreter for all mother languages, thinking and trying to connect every tongue globally

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages