Borno is a Bengali keyword-based JavaScript layer that lets you write JavaScript using Bengali syntax. It is built on top of CodeMirror and executes by translating Bengali keywords into JavaScript before running via eval().
Try Borno Editor ->Website URL
Read GPT generated docs -> Website URL
This project provides:
- Bengali → JavaScript keyword translation
- Custom CodeMirror language mode (
borno) - Autocomplete support
- Bengali console output translation
- Error translation + suggestions in Bangla
- Simple runtime execution engine
Borno replaces Bengali keywords with JavaScript equivalents.
| Bengali | JavaScript |
|---|---|
| চলক | var |
| ধরি | let |
| অভেদ | const |
| প্রক্রিয়া | function |
| ফেরত_দাও | return |
| যদি | if |
| নাহলে যদি | else if |
| নাহলে | else |
| যখন | while |
| কর | do |
| সুইচ | switch |
| যেখানে | case |
| বিরাম | break |
| কিছুনা | void |
| সত্য | true |
| মিথ্যা | false |
| নাল | null |
| Bengali | JavaScript |
|---|---|
| উপাদান | class |
| বানাও | constructor |
| এটা | this |
| নতুন | new |
| সাথে আছে | extends |
| সুপার | super |
| Bengali | Meaning |
|---|---|
| এর চেয়ে বড় | < |
| এর চেয়ে ছোট | > |
| এর সমান | == |
| এবং | && |
| অসত্য | ! |
| Bengali | Digit |
|---|---|
| ০ | 0 |
| ১ | 1 |
| ২ | 2 |
| ৩ | 3 |
| ৪ | 4 |
| ৫ | 5 |
| ৬ | 6 |
| ৭ | 7 |
| ৮ | 8 |
| ৯ | 9 |
These are built-in helper functions written in Bengali:
দেখাও("হ্যালো বিশ্ব!");Equivalent:
console.log("Hello World");ইনপুট("তোমার নাম কী?");Equivalent:
prompt()মনে_রাখ("value", "key");
মনে_আছে("key");- Stores and retrieves values using browser
localStorage
Before execution, code is translated:
for (let key in dic) {
borno_code = borno_code.replace(new RegExp(key, 'g'), dic[key]);
}This converts Bengali syntax into JavaScript.
- User writes code in CodeMirror editor
- Bengali keywords are replaced with JS equivalents
- Code is executed using
eval() - Console output is intercepted and displayed in UI
Custom mode definition:
-
Keywords → highlighted as
keyword -
Strings →
"text"and'text' -
Numbers → Bengali and English digits supported
-
Comments:
// single line/* multi line */
Autocomplete suggests Bengali keywords:
CodeMirror.registerHelper("hint", "borno", function(editor) {- Matches prefix input
- Shows:
Bengali → JavaScript
| English | Bangla |
|---|---|
| SyntaxError | ব্যাকরণগত ত্রুটি |
| ReferenceError | রেফারেন্স ত্রুটি |
| TypeError | টাইপ ত্রুটি |
| Error | Suggestion |
|---|---|
| সংজ্ঞায়িত হয়নি | আপনি কি ভেরিয়েবলটি ডিক্লেয়ার করতে ভুলে গেছেন? |
| ) বন্ধনী নেই | দয়া করে সমস্ত বন্ধনী জোড়া পরীক্ষা করুন |
| অপ্রত্যাশিত টোকেন | আপনার কোডে বানান বা সিনট্যাক্স চেক করুন |
The console is overridden to capture output:
console.logconsole.errorconsole.warn
Each output is rendered in a custom UI panel.
- CodeMirror editor (Dracula theme)
- Run button (
Ctrl + Enter) - Clear console button
- Output terminal panel
প্রক্রিয়া অভিবাদন(নাম) {
দেখাও("হ্যালো " + নাম);
}
অভিবাদন("বাংলাদেশ");Main execution function:
function runBornoCode()Steps:
- Clear console
- Override console
- Translate code
- Execute via
eval() - Show errors in Bangla
- Restore console
- Uses
eval()(not secure for production) - Simple string-based translation (not AST-based)
- No real compiler
- No sandbox isolation