See here https://1abdullahr1.github.io/Roman-Urdu-JS-wrapper/
The Roman Urdu JS Wrapper is a small educational library that lets you write JavaScript programs using Roman Urdu words instead of English keywords. The goal is not to replace JavaScript but to show that programming languages are not magic. They are just built on top of simple rules and predefined words that humans designed. By swapping English keywords with familiar Roman Urdu terms, we make programming more approachable and show that the “language” of programming is about structure, not about English.
Example:
likho('Assalamu Alaikum');
bolo n = 5;
agar (n bara 3) {
likho('n bara hai 3 se');
} warna {
likho('n chhota ya barabar hai 3 se');
}
This code works like normal JavaScript and prints messages, but the words are in Roman Urdu.
- To demonstrate that programming languages are human-designed tools, not magic spells.
- To make programming concepts easier to understand for beginners in Pakistan/India who may find English keywords intimidating.
- To show that the structure (syntax) matters more than the specific keywords.
- To inspire learners to think: “If I can make my own keywords, then programming is not alien, it’s just logic with words.”
The library is a wrapper / transpiler. It:
- Takes your Roman Urdu code.
- Replaces Roman Urdu keywords with JavaScript equivalents.
- Runs the converted code in JavaScript.
For example:
likho→console.logagar→ifwarna→elsebolo→let
- Save
roman-urdu-js-wrapper.jsin your project. - Include it in your HTML file:
<script src="roman-urdu-js-wrapper.js"></script>- Write Roman Urdu code and run it:
<script>
runRoman(`likho('Hello Roman Urdu!');`);
</script>- Copy
roman-urdu-js-wrapper.jsinto your project. - Import it:
const { runRoman } = require('./roman-urdu-js-wrapper');
runRoman("likho('Hello Roman Urdu from Node!')");Here are the predefined Roman Urdu → JavaScript mappings:
| Roman Urdu | JavaScript | Meaning | ||
|---|---|---|---|---|
likho |
console.log |
Print output | ||
agar |
if |
If condition | ||
warna |
else |
Else condition | ||
jabtak |
while |
Loop while condition is true | ||
wapas |
return |
Return from function | ||
karo |
function |
Define a function | ||
bolo |
let |
Declare variable | ||
muqarrar |
const |
Constant variable | ||
aur |
&& |
Logical AND | ||
ya |
` | ` | Logical OR | |
nahin |
! |
NOT (negation) | ||
barabar |
=== |
Equals | ||
bara |
> |
Greater than | ||
chhota |
< |
Less than | ||
seedha |
true |
Boolean true | ||
ghalat |
false |
Boolean false | ||
ke_liye |
for |
For loop |
likho('Hello Duniya!');
bolo umar = 20;
agar (umar bara 18) {
likho('Adult hai');
} warna {
likho('Adult nahin');
}
ke_liye (bolo i = 0; i chhota 5; i++) {
likho('Ginti: ' + i);
}
You can add your own keywords:
extendMapping({ 'chapo': 'document.write' });Then you can write:
chapo('Hello from chapo!');
- This is token-based, not a real parser. Some edge cases may break.
- It’s meant for learning and fun, not production apps.
- Only a limited set of Roman Urdu keywords is supported (but you can extend them).
The Roman Urdu JS Wrapper shows that programming languages are not locked to English — they are just rules plus words. By redefining the words, we prove that programming is simply about logic and structure. This lowers the entry barrier for beginners and shows that anyone can design a programming language.
Key Idea: Programming languages are human creations. They are not magic — they are just agreements on how to write instructions for the computer.