PHPackages                             ironsmile/php-translit - 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. ironsmile/php-translit

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

ironsmile/php-translit
======================

PHP library to convert text from one script to another.

v1.0.2(8y ago)03.5k↓42.3%1MITPHPPHP &gt;=5.2.0

Since Feb 24Pushed 8y ago2 watchersCompare

[ Source](https://github.com/ironsmile/php-translit)[ Packagist](https://packagist.org/packages/ironsmile/php-translit)[ RSS](/packages/ironsmile-php-translit/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

translit
========

[](#translit)

`translit` is a PHP library to convert text from one script to another. Currently it assume conversion of Cyrillic, Georgian, Armenian and Greek scripts into Roman (Latin). Cyrillic has sub-groups for Russian, Ukrainian, Belarusian, Bulgarian and Kazakh languages with custom rules.

Main class Translit could be used as singleton or object itself. Built-in translitaration tables could be refered by following language codes:

- ru - Russian cyrillic chars,
- uk - Ukrainian cyrillic chars,
- mk - Macedonian cyrillic chars,
- be - Belarusian cyrillic chars (converted to latin with diacritical),
- bg - Bulgarian cyrillic chars (converted to latin with diacritical),
- kk - Kazakh cyrillic chars (converted to latin with diacritical),
- ka - Georgian chars,
- hy - Armenian chars (converted to latin with diacritical),
- el - Greek chars (converted to latin with diacritical),
- cyrillic - all cyrillic chars according to ISO 9:1995,
- latin - only latin chars without diacritical marks,
- ascii - only ASCII chars, all non ASCII will be replaced with question mark.

Language codes could be combined by comma to handle more cases, e.g.

```
echo Translit::object()->convert('Беларусь', 'be') . ' vs ' .
    Translit::object()->convert('Беларусь', 'be,latin');

```

produce output:

```
Bielaruś vs Bielarus

```

By default wrong language codes ignored. But this behavior could be changed by using strict mode. For all language codes that prepended with exclamation mark exception will be fired if any error (no conversion table, wrong format, empty). For example:

```
// following code returns 'Привет' as is because handler ru_ru not defined
echo Translit::object()->convert('Привет', 'ru_ru') . PHP_EOL;

// but next code fires Exception, because strict mode have used
echo Translit::object()->convert('Привет', '!ru_ru') . PHP_EOL;

```

There are many sources of these tables which could be used - ISO and BGN/PCGN standards, a lot of native standards and informal standard used by people. For this library I assume next order of sources - native, ISO, BGN/PCGN, informal.

All transliteration tables were created from information found at Wikipedia. The links to these pages posted into header of each file. Please update me if any mistakes found or you have new transliteration tables to add here.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 70.4% 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.

###  Release Activity

Cadence

Every ~48 days

Total

3

Last Release

3275d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7001f0fe498f054e767efd599470288e76b2cce38e94e84f73fe11ed623b2aba?d=identicon)[ironsmile](/maintainers/ironsmile)

---

Top Contributors

[![ashtokalo](https://avatars.githubusercontent.com/u/1886284?v=4)](https://github.com/ashtokalo "ashtokalo (19 commits)")[![adavesik](https://avatars.githubusercontent.com/u/4726494?v=4)](https://github.com/adavesik "adavesik (2 commits)")[![chr314](https://avatars.githubusercontent.com/u/6598377?v=4)](https://github.com/chr314 "chr314 (2 commits)")[![ironsmile](https://avatars.githubusercontent.com/u/50431?v=4)](https://github.com/ironsmile "ironsmile (2 commits)")[![markovic131](https://avatars.githubusercontent.com/u/1120908?v=4)](https://github.com/markovic131 "markovic131 (1 commits)")[![tzkoshi](https://avatars.githubusercontent.com/u/3149847?v=4)](https://github.com/tzkoshi "tzkoshi (1 commits)")

---

Tags

translittransliterationromanizationlatinization

### Embed Badge

![Health badge](/badges/ironsmile-php-translit/health.svg)

```
[![Health](https://phpackages.com/badges/ironsmile-php-translit/health.svg)](https://phpackages.com/packages/ironsmile-php-translit)
```

###  Alternatives

[jbroadway/urlify

A fast PHP slug generator and transliteration library that converts non-ascii characters for use in URLs.

6737.4M62](/packages/jbroadway-urlify)[ashtokalo/php-translit

PHP library to convert text from one script to another.

40146.2k1](/packages/ashtokalo-php-translit)[ausi/slug-generator

Slug Generator

8002.2M22](/packages/ausi-slug-generator)[voku/urlify

PHP port of URLify.js from the Django project. Transliterates non-ascii characters for use in URLs.

254.1M7](/packages/voku-urlify)[fresh/transliteration

PHP library for transliteration.

52135.6k1](/packages/fresh-transliteration)[liopic/korean-romanizer

Library to romanize Korean in UTF-8 format

18162.4k](/packages/liopic-korean-romanizer)

PHPackages © 2026

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