PHPackages                             bubogumy/langdata - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. bubogumy/langdata

ActiveYii2-extension[Localization &amp; i18n](/categories/localization)

bubogumy/langdata
=================

Сервис для работы с языковыми метками.

0161PHP

Since Aug 25Pushed 8y agoCompare

[ Source](https://github.com/Rolf/yii2-langdata)[ Packagist](https://packagist.org/packages/bubogumy/langdata)[ RSS](/packages/bubogumy-langdata/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Сервис для работы с языковыми метками
-------------------------------------

[](#сервис-для-работы-с-языковыми-метками)

В composer.json добавляем

```
"require": {
    "bubogumy/langdata": "dev-master"
}

```

В терминале - `composer require bubogumy/langdata`

Накатываем миграцию из папки migrations командой:

```
./yii migrate --migrationPath=@vendor/bubogumy/langdata/migrations

```

### Использование

[](#использование)

Присваиваем класс `$I = new bubogumy\LangService`
И выводим нужный нам перевод по нашему slug, выбрав нужный язык `echo $I->translate('button.succes.ok', $I::LANG_ENG);`
Использование с параметризированными метками в виде массива: `echo $q->translate('parse.timerInfo', $I::LANG_ENG, $params);`, где $params - массив с нужными параметрами. Данные из него заменяются вместо `{}` на данные из массива соответственно.

#### Пример

[](#пример)

Емеется таблица в БД вида:

slugrusengbutton.success.okПринятьAcceptparse.timerInfoДо завершения операции, предположительно, {0} минутPrior to completion of the operation, presumably, {0} minutes.```
$I = new bubogumy\LangService
echo $I->translate('button.succes.ok', $I::LANG_RUS);

```

Результат: `Принять`

```
$params = [10, 20, 30];
$I = new bubogumy\LangService
echo $I->translate('parse.timerInfo', $I::LANG_RUS, $params);

```

Результат: `До завершения операции, предположительно, 10 минут`

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/4889a528adbacfd30940469274c6d28b4670a4cce1c70e255ff0a015a774440f?d=identicon)[bubogumy](/maintainers/bubogumy)

### Embed Badge

![Health badge](/badges/bubogumy-langdata/health.svg)

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

###  Alternatives

[smarty-gettext/smarty-gettext

Gettext plugin enabling internationalization in Smarty Package files

752.5M8](/packages/smarty-gettext-smarty-gettext)[renatomarinho/laravel-multi-language

Laravel Multi Language

235.1k](/packages/renatomarinho-laravel-multi-language)

PHPackages © 2026

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