PHPackages                             abeliani/translated-slug-helper - 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. abeliani/translated-slug-helper

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

abeliani/translated-slug-helper
===============================

Helps to get a valid slug translated or transliterated by a driver collection

v1.0.0(2y ago)05MITPHPPHP ^8.1

Since May 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/abeliani/translated-slug-helper)[ Packagist](https://packagist.org/packages/abeliani/translated-slug-helper)[ Docs](https://treecode.ru)[ RSS](/packages/abeliani-translated-slug-helper/feed)WikiDiscussions develop Synced 1mo ago

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

TranslatedSlugHelper - helps to get a valid url slug translated or transliterated by a driver collection
========================================================================================================

[](#translatedslughelper---helps-to-get-a-valid-url-slug-translated-or-transliterated-by-a-driver-collection)

The package uses libraries **[StringTranslator](https://github.com/abeliani/string-translator.git)** and **[SlugHelper](https://github.com/abeliani/slug-helper.git)**.

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

[](#installation)

```
composer require abeliani/translated-slug-helper
```

Examples
--------

[](#examples)

### Example of offline driver

[](#example-of-offline-driver)

Blog posts often require a slug to generate a url. We can use a transliteration driver which simply transliteration the symbol table for example: u-у and vice versa.

```
$slug = new TranslatedSlugHelper(
    new Settings('ru'),
    new TranslatedBy(Translit::class)
);

print $slug->from('Привет мир!', 'en'); // privet-mir
```

### Example of online driver

[](#example-of-online-driver)

Online drivers perform translate a text.

```
$slug = new TranslatedSlugHelper(
    new Settings('ru', ['a', 'an']), // to remove words from slug (eg. a, an) we can pass them by array
    new TranslatedBy(MyMemory::class, ['apiKey' => 'someapikey'])
);

print $slug->from('Привет мир!', 'en'); // hello-world
```

### Example of driver chain

[](#example-of-driver-chain)

An online driver will suddenly be unavailable (for example), in this case we can pass a string for translation from one driver to another along the chain.

```
$chain = [
   new TranslatedBy(MyMemory::class, ['apiKey' => 'someapikey']),
   new TranslatedBy(Translit::class),
];

$slug = new TranslatedSlugHelper(
    new Settings('ru'),
    ...$chain,
);

print $slug->from('Привет мир!', 'en'); // if MyMemory service is available: hello-world | otherwise by transilt driver: privet-mir
```

If you need to change the word separator. you can pass it through settings object

```
// Passing new divider +
new Settings('ru', [], '+')
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity50

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

Unknown

Total

1

Last Release

732d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9617a072a7fa76b7fcef4a6ea49963df513e04fd2ca4bd94881d0f19dfe09f37?d=identicon)[abeliani](/maintainers/abeliani)

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/abeliani-translated-slug-helper/health.svg)

```
[![Health](https://phpackages.com/badges/abeliani-translated-slug-helper/health.svg)](https://phpackages.com/packages/abeliani-translated-slug-helper)
```

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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