Bilingual aliases
Bnlang lets you write any program in English, Bangla, or a mix of the two. For every common identifier in the language — keywords, built-in globals, and standard-library module names — there's an English form and a Bangla form, and the runtime treats them as the same thing.
You can use whichever form reads more naturally for what you're writing. Mixing within a single file is fine; both forms can appear in the same line if you want.
ফাংশন main() {
লিখুন("Hello, world!");
}
main();
Keywords
See the dedicated Keywords page. Every keyword has a Bangla synonym (e.g. function / ফাংশন, if / যদি, wait / অপেক্ষা); they're handled at lexing time, so the parser sees the same token regardless of which form you wrote.
Global functions
These names are bound in the global scope at interpreter startup. Both names point to the same callable.
| English | Bangla |
|---|---|
print | লিখুন |
input | ইনপুট |
str | স্ট্রিং |
to_number | সংখ্যা |
chr | অক্ষর |
type | ধরণ |
try_call | নিরাপদ_কল |
pretty | সুন্দর |
dump | বিস্তারিত |
Future | ভবিষ্যৎ |
futurify | ভবিষ্যৎকর |
See the Globals page for behavior details.
Module names
import "X" and import "Y" resolve to the same Module instance when X and Y are aliases. So an instance imported under one name is identical to one imported under the other — comparing them with == returns true.
Native modules
| English | Bangla |
|---|---|
_io | _ফাইল |
timers | টাইমার |
net | নেট |
json | জেসন |
sys | সিস্টেম |
time | সময় |
path | পথ |
math | গণিত |
random | এলোমেলো |
crypto | ক্রিপ্টো |
regex | প্যাটার্ন |
http | এইচটিটিপি |
tls | টিএলএস |
Lib (embedded) modules
| English | Bangla |
|---|---|
io | ফাইল |
request | অনুরোধ |
web | ওয়েব |
url | ইউআরএল |
log | লগ |
test | টেস্ট |
zlib | সংকোচন |
sqlite | এসকিউলাইট |
pg | পোস্টগ্রেস |
mysql | মাইএসকিউএল |
mongo | মঙ্গো |
exec | চালান |
dns | ডিএনএস |
template | টেমপ্লেট |
ws | ওয়েবসকেট |
cookie | কুকি |
session | অধিবেশন |
multipart | মাল্টিপার্ট |
dotenv | ডটএনভ |
cli | কমান্ড |
uuid | ইউইউআইডি |
csv | সিএসভি |
Verifying
You can confirm two forms resolve to the same value at runtime:
import "এলোমেলো" as rng_bn;
import "random" as rng_en;
print(rng_bn == rng_en); // true
print(Future == ভবিষ্যৎ); // true
Why this exists
Bnlang's goal is to let writers stay in the language they think in, without forcing a fork in the ecosystem. Programs written in either form are perfectly equivalent; libraries written in one form are usable from the other; you never have to choose globally.
The full alias table lives in src/runtime/bn_aliases.h — one file, one source of truth. Adding a new alias is a one-line change.