npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bhasha-js

v0.1.0-beta.1

Published

The first i18n developer tool purpose-built for South Asian languages

Readme

भाषाJS

The first i18n developer tool purpose-built for South Asian languages.

BhashaJS handles the hard parts of South Asian localization that other i18n libraries ignore: RTL/LTR auto-switching for Urdu, correct fonts for every script, culturally-aware fallback chains, and the lakh/crore number system.

Quick Start

npm install bhashajs

1. Wrap your app

import { I18nProvider, LanguageSwitcher } from 'bhashajs';

function App() {
  return (
    <I18nProvider
      projectId="your-project-id"
      apiToken="your-token"
      defaultLang="en"
    >
      <LanguageSwitcher style="floating" position="top-right" />
      <YourApp />
    </I18nProvider>
  );
}

2. Translate your text

import { useTranslation } from 'bhashajs';

function HomePage() {
  const { t } = useTranslation();

  return (
    <div>
      <h1>{t('hero.title')}</h1>
      <p>{t('hero.subtitle')}</p>
      <p>{t('greeting', { name: 'Rohan' })}</p>
    </div>
  );
}

That's it. Your app now supports multiple languages.

Features

Automatic RTL Support

When a user switches to Urdu, BhashaJS automatically sets dir="rtl" on the document, flipping your entire layout. Switch back to Hindi and it reverts to LTR. Zero config needed.

Smart Font Loading

Each South Asian script needs a specific font to render correctly. BhashaJS automatically loads the right Google Font when a language is selected:

  • Hindi/Marathi/Nepali → Noto Sans Devanagari
  • Bengali → Noto Sans Bengali
  • Urdu → Noto Nastaliq Urdu
  • Tamil → Noto Sans Tamil
  • Telugu → Noto Sans Telugu
  • Punjabi → Noto Sans Gurmukhi

Culturally-Aware Fallbacks

If a Bengali translation is missing, BhashaJS falls back to Hindi before English — because a Bengali speaker is more likely to understand Hindi. This is configurable per language.

Interpolation

// In your dashboard: "greeting" → "नमस्ते {name}, आपके पास {count} आइटम हैं"
t('greeting', { name: 'Rohan', count: 5 })
// → "नमस्ते Rohan, आपके पास 5 आइटम हैं"

API Reference

<I18nProvider>

| Prop | Type | Default | Description | |------|------|---------|-------------| | projectId | string | required | Your BhashaJS project ID | | defaultLang | string | "en" | Initial language | | apiUrl | string | localhost:5000 | BhashaJS API URL | | apiToken | string | — | Your API auth token | | preloadedTranslations | object | — | Skip API, use bundled translations | | onLanguageChange | function | — | Callback when language changes |

useTranslation()

const { t, currentLang, setLang, supportedLangs, isLoading, error } = useTranslation();

<LanguageSwitcher>

| Prop | Type | Default | Description | |------|------|---------|-------------| | style | "dropdown" | "floating" | "dropdown" | Visual style | | position | "top-right" | "top-left" | "bottom-right" | "bottom-left" | "top-right" | Floating position | | className | string | — | Custom CSS class |

<Trans> Component

<Trans id="hero.title" />
<Trans id="greeting" params={{ name: 'Rohan' }} as="h1" />

useLangInfo()

const { dir, font, name, englishName } = useLangInfo();

Supported Languages

| Code | Language | Script | Direction | |------|----------|--------|-----------| | en | English | Latin | LTR | | hi | हिन्दी (Hindi) | Devanagari | LTR | | bn | বাংলা (Bengali) | Bengali | LTR | | ur | اردو (Urdu) | Nastaliq | RTL | | ta | தமிழ் (Tamil) | Tamil | LTR | | te | తెలుగు (Telugu) | Telugu | LTR | | mr | मराठी (Marathi) | Devanagari | LTR | | ne | नेपाली (Nepali) | Devanagari | LTR | | pa | ਪੰਜਾਬੀ (Punjabi) | Gurmukhi | LTR |

License

MIT