Ethio-Intl
A modern JavaScript SDK for Ethiopian web applications with Amharic transliteration, Ethiopian calendar conversion, Geez numerals, and multi-language support.
Project Video
Click the image below to watch our project video:
https://youtube.com/shorts/qNbTvrurcp8?feature=share
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
Basic Usage
// Ethiopian Calendar
const today = new Date();
const ethDate = toEthDate(today, 'en');
// Result: "Tahsas 13, 2018"
const ethDateAmharic = toEthDate(today, 'am');
// Result: "taahesaase 13, 2018"
// Geez Numerals
const geezNumber = toEthNumber(2025);
// Result: "20+100+20+5"
const geez100 = toEthNumber(100);
// Result: "100+" (note: no '1' multiplier)
API Reference
Calendar Functions
toEthDate(date, lang?)
Convert Gregorian date to Ethiopian date.
const ethDate = toEthDate(new Date(2025, 8, 11), 'en');
// Result: "Meskerem 1, 2018"
const ethDateAmharic = toEthDate(new Date(2025, 8, 11), 'am');
// Result: "masekarame 1, 2018"
isEthiopianLeapYear(year)
Check if Ethiopian year is a leap year.
isEthiopianLeapYear(2018); // true
isEthiopianLeapYear(2017); // false
Numeral Functions
toEthNumber(num)
Convert Arabic number to Geez numerals.
toEthNumber(1); // "1"
toEthNumber(10); // "10+"
toEthNumber(100); // "100+"
toEthNumber(1000); // "10+100+"
toEthNumber(2025); // "20+100+20+5"
fromEthNumber(geezString)
Convert Geez numerals to Arabic number.
fromEthNumber('20+100+20+5'); // 2025
fromEthNumber('100+'); // 100
React Integration
EthioProvider
React Context provider for internationalization.
const translations = {
en: { translation: { welcome: 'Welcome!' } },
am: { translation: { welcome: ''enekwaane dahenaa mathu!' } }
};
function App() {
return (
<EthioProvider
resources={translations}
defaultLang="am"
fallbackLang="en"
>
<YourComponents />
EthioProvider>
);
}
useEthioIntl
Custom hook for accessing internationalization context.
{t('welcome')}
function MyComponent() {
const { t, changeLanguage, currentLang } = useEthioIntl();
return (
<div>
<h1>{t('welcome')}h1>
<button onClick={() => changeLanguage('am')}>
Switch to Amharic
button>
div>
);
}