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

ethio-intl

v1.0.0

Published

A modern JavaScript SDK for Ethiopian web applications with Amharic transliteration, Ethiopian calendar conversion, Geez numerals, and multi-language support

Readme

🌍 Ethio-Intl

npm version License: MIT TypeScript npm downloads GitHub stars GitHub issues

A modern JavaScript SDK for Ethiopian web applications with Amharic transliteration, Ethiopian calendar conversion, Geez numerals, and multi-language support.

🎮 Live Demo

Try the interactive demo: Open Demo

Experience real-time Amharic transliteration, Ethiopian calendar conversion, Geez numerals, and multi-language support!

✨ Features

  • 🔤 Amharic Transliteration: Real-time English to Amharic conversion
  • 📅 Ethiopian Calendar: Precise Gregorian ↔ Ethiopian date conversion
  • 🔢 Geez Numerals: Convert Arabic numbers to traditional Geez script
  • 🌐 Multi-language Support: Amharic, English, Tigrinya, and Oromo
  • Zero Dependencies: Pure TypeScript with no external libraries
  • 🎯 TypeScript First: Full type safety and IntelliSense support
  • 🪝 React Hooks: Custom hooks for easy React integration

🚀 Quick Start

Installation

npm install ethio-intl
yarn add ethio-intl
pnpm add ethio-intl

Basic Usage

import { toEthDate, toEthNumber } from 'ethio-intl';

// Ethiopian Calendar
const today = new Date();
const ethDate = toEthDate(today, 'en');
// Result: "Tahsas 13, 2018"

const ethDateAmharic = toEthDate(today, 'am');
// Result: "ታህሳስ 13, 2018"

// Geez Numerals
const geezNumber = toEthNumber(2025);
// Result: "፳፻፳፭"

const geez100 = toEthNumber(100);
// Result: "፻" (note: no '1' multiplier)

📚 API Reference

Calendar Functions

toEthDate(date, lang?)

Convert Gregorian date to Ethiopian date.

import { toEthDate } from 'ethio-intl';

const ethDate = toEthDate(new Date(2025, 8, 11), 'en');
// Result: "Meskerem 1, 2018"

const ethDateAmharic = toEthDate(new Date(2025, 8, 11), 'am');
// Result: "መስከረም 1, 2018"

isEthiopianLeapYear(year)

Check if Ethiopian year is a leap year.

import { isEthiopianLeapYear } from 'ethio-intl';

isEthiopianLeapYear(2018); // true
isEthiopianLeapYear(2017); // false

Numeral Functions

toEthNumber(num)

Convert Arabic number to Geez numerals.

import { toEthNumber } from 'ethio-intl';

toEthNumber(1);      // "፩"
toEthNumber(10);     // "፲"
toEthNumber(100);    // "፻"
toEthNumber(1000);   // "፲፻"
toEthNumber(2025);   // "፳፻፳፭"

fromEthNumber(geezString)

Convert Geez numerals to Arabic number.

import { fromEthNumber } from 'ethio-intl';

fromEthNumber('፳፻፳፭'); // 2025
fromEthNumber('፻');    // 100

React Integration

EthioProvider

React Context provider for internationalization.

import { EthioProvider } from 'ethio-intl';

const translations = {
  en: { translation: { welcome: 'Welcome!' } },
  am: { translation: { welcome: 'እንኳን ደህና መጡ!' } }
};

function App() {
  return (
    <EthioProvider
      resources={translations}
      defaultLang="am"
      fallbackLang="en"
    >
      <YourComponents />
    </EthioProvider>
  );
}

useEthioIntl

Custom hook for accessing internationalization context.

import { useEthioIntl } from 'ethio-intl';

function MyComponent() {
  const { t, changeLanguage, currentLang } = useEthioIntl();

  return (
    <div>
      <h1>{t('welcome')}</h1>
      <button onClick={() => changeLanguage('am')}>
        Switch to Amharic
      </button>
    </div>
  );
}

useTransliterate

Hook for real-time Amharic transliteration.

import { useTransliterate } from 'ethio-intl';

function TransliterComponent() {
  const [text, setText] = useState('');
  const translated = useTransliterate(text);

  return (
    <div>
      <input
        value={text}
        onChange={(e) => setText(e.target.value)}
        placeholder="Type in English..."
      />
      <p>Amharic: {translated}</p>
    </div>
  );
}

🎯 Use Cases

Financial Applications

// Ethiopian banking date formatting
const transactionDate = toEthDate(new Date(), 'am');
console.log(`ቀን: ${transactionDate}`);

E-commerce Platforms

// Product pricing in Geez numerals
const price = toEthNumber(2500);
console.log(`ዋጋ: ${price} ብር`);

Cultural Applications

// Traditional date display
const today = new Date();
const ethDate = toEthDate(today, 'am');
const geezYear = toEthNumber(today.getFullYear());

console.log(`የነገ ቀን: ${ethDate.replace(/\d{4}$/, geezYear)}`);

Government Systems

// Official document dating
const officialDate = toEthDate(new Date(), 'am');
console.log(`ቀን: ${officialDate}`);

🔧 Advanced Configuration

Custom Language Support

const customTranslations = {
  en: {
    translation: { hello: 'Hello' },
    custom: { greeting: 'Welcome' }
  },
  am: {
    translation: { hello: 'ሰላም' },
    custom: { greeting: 'እንኳን ደህና መጡ' }
  }
};

<EthioProvider resources={customTranslations}>
  <App />
</EthioProvider>

Dynamic Translation Loading

const { loadNamespace, loadTranslations } = useEthioIntl();

// Load page-specific translations
useEffect(() => {
  loadNamespace('en', 'dashboard', dashboardEn);
  loadNamespace('am', 'dashboard', dashboardAm);
}, []);

🌍 Supported Languages

| Language | Code | Status | |----------|------|--------| | Amharic | am | ✅ Full Support | | English | en | ✅ Full Support | | Tigrinya | ti | ✅ Full Support | | Oromo | om | ✅ Full Support |

🏗️ Technical Details

Calendar System

  • Ethiopian Calendar: 13-month system (12 months × 30 days + Pagume)
  • Leap Years: Ethiopian year % 4 === 3
  • New Year: Meskerem 1 (usually September 11/12)
  • Time Offset: ~7-8 years behind Gregorian

Numeral System

  • Geez Numerals: Unicode-based traditional script
  • Special Rules: No '1' multiplier for 100 (፻) and 10,000 (፼)
  • Range: Supports numbers up to 1,000,000+

Performance

  • Bundle Size: ~15KB minified + gzipped
  • Zero Runtime Dependencies: Pure TypeScript implementation
  • Tree Shaking: Import only what you need

🧪 Testing

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Run tests in watch mode
npm run test:watch

📦 Build

# Development build with watch
npm run dev

# Production build
npm run build

# Type checking
npm run type-check

# Linting
npm run lint

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Ethiopian developers community
  • Unicode Consortium for Ethiopic script support
  • Open source contributors

📞 Support


🌐 Website📚 Documentation🎮 Demo🐙 GitHub