PHPackages                             wossnap/amharic-transliteration - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wossnap/amharic-transliteration

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wossnap/amharic-transliteration
===============================

Laravel package for transliterating Amharic (Ethiopic) text to Latin and handling phonetically equivalent character variants.

v1.0.1(2mo ago)020MITPHP ^8.1|^8.2|^8.3|^8.4

Since Apr 28Compare

[ Source](https://github.com/Wossnap/amharic-transliteration)[ Packagist](https://packagist.org/packages/wossnap/amharic-transliteration)[ RSS](/packages/wossnap-amharic-transliteration/feed)WikiDiscussions Synced 3w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

wossnap/amharic-transliteration
===============================

[](#wossnapamharic-transliteration)

A Laravel package for transliterating Amharic (Ethiopic) text to Latin and handling phonetically equivalent character variants.

Amharic has several characters that share the same sound — for example `አ`, `ዓ`, `ኣ`, and `ዐ` are all pronounced the same way. This package maps every character to its Latin phonetic equivalent and provides tools to work with those variants in search, speech recognition, and admin interfaces.

---

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12

---

Installation
------------

[](#installation)

```
composer require wossnap/amharic-transliteration
```

Laravel auto-discovers the service provider. No manual registration needed.

---

Quick start
-----------

[](#quick-start)

```
use Wossnap\AmharicTransliteration\Facades\AmharicTransliteration;

AmharicTransliteration::transliterate('ሰላም');
// → "selam"

AmharicTransliteration::getAmharicVariants('አምሮ');
// → ["አምሮ", "ኣምሮ", "ዐምሮ", "ዓምሮ"]
```

You can also inject the service directly:

```
use Wossnap\AmharicTransliteration\AmharicTransliterationService;

class WordController extends Controller
{
    public function __construct(
        private AmharicTransliterationService $transliterator
    ) {}

    public function store(Request $request)
    {
        $transliterations = $this->transliterator->getSuggestedTransliterations(
            $request->input('word')
        );
    }
}
```

---

API reference
-------------

[](#api-reference)

### Core transliteration

[](#core-transliteration)

#### `transliterate(string $text): string`

[](#transliteratestring-text-string)

Transliterate a full Amharic string to its Latin phonetic equivalent. Non-Amharic characters (spaces, numbers, punctuation) pass through unchanged.

```
AmharicTransliteration::transliterate('ሰላም');         // "selam"
AmharicTransliteration::transliterate('ደህና ሁን');      // "dehna hun"
AmharicTransliteration::transliterate('hello ሰላም');   // "hello selam"
```

---

#### `transliterateChar(string $char): ?string`

[](#transliteratecharstring-char-string)

Transliterate a single character. Returns `null` if the character has no mapping.

```
AmharicTransliteration::transliterateChar('ሰ');   // "se"
AmharicTransliteration::transliterateChar('ላ');   // "la"
AmharicTransliteration::transliterateChar('A');   // null
AmharicTransliteration::transliterateChar(' ');   // null
```

---

### Variant handling

[](#variant-handling)

#### `getAmharicVariants(string $word): array`

[](#getamharicvariantsstring-word-array)

Return every possible Amharic spelling of a word by substituting each character with all of its phonetically equivalent alternatives.

```
AmharicTransliteration::getAmharicVariants('አምሮ');
// ["አምሮ", "ኣምሮ", "ዐምሮ", "ዓምሮ"]

AmharicTransliteration::getAmharicVariants('ሰላም');
// ["ሰላም", "ሠላም"]
```

---

#### `getCharEquivalents(string $char): array`

[](#getcharequivalentsstring-char-array)

Return all Amharic characters that sound identical to the given character. The given character is always included in the result.

```
AmharicTransliteration::getCharEquivalents('አ');   // ["አ", "ኣ", "ዐ", "ዓ"]
AmharicTransliteration::getCharEquivalents('ሰ');   // ["ሰ", "ሠ"]
AmharicTransliteration::getCharEquivalents('ለ');   // ["ለ"]  — no equivalents
```

---

#### `areEquivalent(string $charA, string $charB): bool`

[](#areequivalentstring-chara-string-charb-bool)

Check whether two characters share the same sound.

```
AmharicTransliteration::areEquivalent('አ', 'ዓ');   // true
AmharicTransliteration::areEquivalent('አ', 'ዐ');   // true
AmharicTransliteration::areEquivalent('አ', 'ለ');   // false
```

---

#### `hasVariants(string $char): bool`

[](#hasvariantsstring-char-bool)

Check whether a character has at least one phonetically equivalent alternative.

```
AmharicTransliteration::hasVariants('አ');   // true
AmharicTransliteration::hasVariants('ለ');   // false
```

---

### Detection &amp; utility

[](#detection--utility)

#### `isAmharic(string $text): bool`

[](#isamharicstring-text-bool)

Check whether a string contains at least one Amharic character.

```
AmharicTransliteration::isAmharic('ሰላም');          // true
AmharicTransliteration::isAmharic('hello');         // false
AmharicTransliteration::isAmharic('hello ሰላም');    // true
```

---

#### `splitToChars(string $text): array`

[](#splittocharsstring-text-array)

Split an Amharic (or mixed) string into individual characters using correct multi-byte handling.

```
AmharicTransliteration::splitToChars('ሰላም');   // ["ሰ", "ላ", "ም"]
```

---

### Introspection

[](#introspection)

#### `getMap(): array`

[](#getmap-array)

Return the full Amharic → Latin character map as an associative array.

```
$map = AmharicTransliteration::getMap();
$map['ሰ'];   // "se"
$map['ላ'];   // "la"
```

---

#### `getEquivalenceGroups(): array`

[](#getequivalencegroups-array)

Return all defined equivalence groups. Each entry is an array of characters that share the same sound.

```
$groups = AmharicTransliteration::getEquivalenceGroups();
// [
//   ["አ", "ኣ", "ዐ", "ዓ"],
//   ["ሀ", "ሐ", "ኀ"],
//   ["ሰ", "ሠ"],
//   ...
// ]
```

---

Equivalence groups explained
----------------------------

[](#equivalence-groups-explained)

Amharic writing has several homophone families — different characters that represent the same spoken sound. The most common ones this package handles:

FamilyCharactersSoundአ / ዐ`አ` `ኣ` `ዐ` `ዓ`aሀ / ሐ / ኀ`ሀ` `ሐ` `ኀ` (and their vowel forms)hሰ / ሠ`ሰ` `ሠ` (and their vowel forms)sጸ / ፀ`ጸ` `ፀ` (and their vowel forms)tsጰ / ፐ`ጰ` `ፐ` (and their vowel forms)pWhen you call `transliterate()`, all characters within a family produce the same Latin output, so a single transliteration covers all variant spellings.

---

Publishing config
-----------------

[](#publishing-config)

```
php artisan vendor:publish --tag=amharic-transliteration-config
```

Publishing the data file (if you need custom mappings)
------------------------------------------------------

[](#publishing-the-data-file-if-you-need-custom-mappings)

```
php artisan vendor:publish --tag=amharic-transliteration-data
```

---

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance83

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

87d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/54106105?v=4)[Wossnap](/maintainers/Wossnap)[@Wossnap](https://github.com/Wossnap)

---

Tags

laraveltransliterationethiopianAmharicethiopic

### Embed Badge

![Health badge](/badges/wossnap-amharic-transliteration/health.svg)

```
[![Health](https://phpackages.com/badges/wossnap-amharic-transliteration/health.svg)](https://phpackages.com/packages/wossnap-amharic-transliteration)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
