Modern Ethiopian internationalization library with Amharic transliteration, Ethiopian calendar, Geez numerals, and multi-language support
import { useTransliterate } from 'ethio-intl';
// In your React component
function MyComponent() {
const [text, setText] = useState('');
const translated = useTransliterate(text);
return (
<input
value={text}
onChange={(e) => setText(e.target.value)}
placeholder="Type in English..."
/>
<p>{translated}</p>
);
}
import { toEthDate } from 'ethio-intl';
// Convert Gregorian to Ethiopian
const today = new Date();
const ethDate = toEthDate(today, 'en');
// Result: "Tahsas 13, 2018"
const ethDateAmharic = toEthDate(today, 'am');
// Result: "áłá
áłáľ 13, 2018"
// Handle leap years automatically
const leapYear = new Date(2024, 8, 11);
const ethLeap = toEthDate(leapYear);
// Result: "Meskerem 1, 2017" (note: 7-8 year offset)
import { toEthNumber, fromEthNumber } from 'ethio-intl';
// Arabic to Geez
const geez = toEthNumber(2025);
// Result: "áłáťáłá"
const geez100 = toEthNumber(100);
// Result: "áť" (note: no '1' multiplier)
const geez10000 = toEthNumber(10000);
// Result: "áź" (note: no '1' multiplier)
// Geez to Arabic
const arabic = fromEthNumber('áłáťáłá');
// Result: 2025
// 1. Set up translations
const translations = {
en: {
translation: {
welcome: 'Welcome to Ethio-Intl!',
userCount: 'We have {count} users',
namespaced: { header: 'Advanced Features' }
}
},
am: {
translation: {
welcome: 'áĽááłá á°á
á áᥠáá° á˘áľáŽ-á˘ááľá!',
userCount: '{count} á°á áááá˝ á áá',
namespaced: { header: 'á¨áá áŁá
áŞáŤáľ' }
}
}
};
// 2. Wrap your app
function App() {
return (
<EthioProvider
resources={translations}
defaultLang="am"
fallbackLang="en"
>
<YourComponents />
</EthioProvider>
);
}
// 3. Use in components
function MyComponent() {
const { t, tNamespace, changeLanguage, currentLang } = useEthioIntl();
return (
<div>
<h1>{t('welcome')}</h1>
<p>{t('userCount', { count: '1,234' })}</p>
<p>{tNamespace('namespaced', 'header')}</p>
<button onClick={() => changeLanguage('am')}>
Switch to Amharic
</button>
</div>
);
}
As you type English letters, they instantly become Amharic characters with smart combinations and cursor management.
Uses Julian Day Number algorithm for mathematically precise Gregorian â Ethiopian calendar conversion, accounting for leap years and the 7-8 year offset.
Convert Arabic numbers to authentic Geez script with proper formatting rules, including special handling for hundreds and ten-thousands.
Built-in internationalization with React Context API, supporting Amharic, English, Tigrinya, and Oromo with extensible architecture.
All calculations use pure TypeScript/Math - no external libraries required. Perfect for traditional Ethiopian web applications.
Dynamic loading, namespaced translations, hot reloading, and development tools for large-scale applications.
# Install
npm install ethio-intl
# Import what you need
import { toEthDate, toEthNumber, useTransliterate, EthioProvider } from 'ethio-intl';
// Use in your app
function EthiopianApp() {
return (
<EthioProvider resources={translations} defaultLang="am">
<YourComponents />
</EthioProvider>
);
}