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

ActiveLibrary

goszowski/php-translit
======================

PHP library to convert text from one script to another.

010PHP

Since Dec 4Pushed 8y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (1)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

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.6% 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/df76ecb70f503e8a34cfd32327d30918ca5abf085aa6da749bdc1edd1546f096?d=identicon)[goszowski](/maintainers/goszowski)

---

Top Contributors

[![ashtokalo](https://avatars.githubusercontent.com/u/1886284?v=4)](https://github.com/ashtokalo "ashtokalo (19 commits)")[![goszowski](https://avatars.githubusercontent.com/u/10208931?v=4)](https://github.com/goszowski "goszowski (9 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)")[![markovic131](https://avatars.githubusercontent.com/u/1120908?v=4)](https://github.com/markovic131 "markovic131 (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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