PHPackages                             lukaswhite/transliterator - 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. lukaswhite/transliterator

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

lukaswhite/transliterator
=========================

A PHP library for transliterating strings

08PHP

Since Sep 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/lukaswhite/transliterator)[ Packagist](https://packagist.org/packages/lukaswhite/transliterator)[ RSS](/packages/lukaswhite-transliterator/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Transliterator
==============

[](#transliterator)

Transliterate strings with PHP (7+); e.g. remove accented characters.

So "Liberté" becomes "Liberte", "nåløye" becomes "naloeye", and so on.

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

[](#installation)

Install using Composer:

```
composer install lukaswhite\transliterator

```

Usage
-----

[](#usage)

```
use Lukaswhite\Transliterator\Transliterator;

$transliterator = new Transliterator( );

print $transliterator->run( 'Liberté' );
// outputs Liberte

print $transliterator->run( 'nåløye' );
// outputs naloeye
```

### Advanced Usage

[](#advanced-usage)

Internally, the class maintains a table of character mappings. To get it, for example to inspect it:

```
var_dump( $transliterator->getTable( ) );
```

To add a substitution:

```
$transliterator->addToTable( 'a', 'b' );
```

To remove a substitution:

```
$transliterator->removeFromTable( 'a' );
```

To replace the whole table:

```
$transliterator->setTable(
	[
		'á' => 'a',
		'é' => 'e',
		'è' => 'e',
	]
);
```

Credits
-------

[](#credits)

This package is based on [this answer on Stackoverflow](https://stackoverflow.com/questions/6837148/change-foreign-characters-to-their-normal-equivalent#answer-6837302).

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f1bd633ffdf0f66a73a288c4edcacfa43d214cd95a53384c6fe5ea4b3554dd9d?d=identicon)[lukaswhite](/maintainers/lukaswhite)

---

Top Contributors

[![lukaswhite](https://avatars.githubusercontent.com/u/999014?v=4)](https://github.com/lukaswhite "lukaswhite (3 commits)")

### Embed Badge

![Health badge](/badges/lukaswhite-transliterator/health.svg)

```
[![Health](https://phpackages.com/badges/lukaswhite-transliterator/health.svg)](https://phpackages.com/packages/lukaswhite-transliterator)
```

###  Alternatives

[bolt/project

Bolt standard project skeleton

4629.6k](/packages/bolt-project)

PHPackages © 2026

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