PHPackages                             landlib/ruslexicon - 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. landlib/ruslexicon

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

landlib/ruslexicon
==================

Набор функций для изменения слов в русском языке

010PHP

Since Dec 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/lamzin-andrey/ruslexicon)[ Packagist](https://packagist.org/packages/landlib/ruslexicon)[ RSS](/packages/landlib-ruslexicon/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Ru
==

[](#ru)

Что это
-------

[](#что-это)

Это набор функций для изменения формы слов в русском языке

Установка
---------

[](#установка)

`composer require landlib/ruslexicon`

или

`git clone https://github.com/lamzin-andrey/ruslexicon`

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

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

### getMeasureWordMorph

[](#getmeasurewordmorph)

#### Описание

[](#описание)

Возвращает слово - единицу измерения в зависимости от значения целого числа. Например "один день" или "два дня" или "девятнадцать дней".

#### Пример

[](#пример)

```
use Landlib\RusLexicon;

echo RusLexicon::getMeasureWordMorph(4, 'день', 'дня', 'дней') . "\n";   //> дня
echo RusLexicon::getMeasureWordMorph(1, 'день', 'дня', 'дней') . "\n";   //> день
echo RusLexicon::getMeasureWordMorph(129, 'день', 'дня', 'дней') . "\n"; //> дней
echo RusLexicon::getMeasureWordMorph(0, 'день', 'дня', 'дней') . "\n";   //> дней
```

### getCityNameFor\_In\_the\_City

[](#getcitynamefor_in_the_city)

#### Описание

[](#описание-1)

Изменяет наименование населённого пункта так, чтобы оно корректно отображалось с предлогом "в". Например "Москва" -&gt; "Москве".

#### Пример

[](#пример-1)

```
use Landlib\RusLexicon;
echo RusLexicon::getCityNameFor_In_the_City('Москва') . "\n";	//> Москве
echo RusLexicon::getCityNameFor_In_the_City('Краснодарский') . ' ' . RusLexicon::getCityNameFor_In_the_City('край') . "\n";
//> Краснодарском крае
```

En
==

[](#en)

About
-----

[](#about)

This functions scope for transform word from Russian Language. For example, in Russian language mesure unit may change depends of value. In English Language phrases "four days", "eleven days" always have the last word "days", but in Russian Language this phrases will have different last words.

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

[](#installation)

`composer require landlib/ruslexicon`

or

`git clone https://github.com/lamzin-andrey/ruslexicon`

Usage
-----

[](#usage)

### getMeasureWordMorph

[](#getmeasurewordmorph-1)

#### Description

[](#description)

Return a word depends from integer argument value. For example "one day" or "nine days".

#### Example

[](#example)

```
use Landlib\RusLexicon;

echo RusLexicon::getMeasureWordMorph(4, 'day', 'days', 'days') . "\n";   //> days
echo RusLexicon::getMeasureWordMorph(1, 'day', 'days', 'days') . "\n";   //> day
echo RusLexicon::getMeasureWordMorph(129, 'day', 'days', 'days') . "\n"; //> days
echo RusLexicon::getMeasureWordMorph(0, 'day', 'days', 'days') . "\n";   //> days
```

### getCityNameFor\_In\_the\_City

[](#getcitynamefor_in_the_city-1)

#### Description

[](#description-1)

Russian utf-8 only. Change city or town name for using with "in the". For example "Москва" -&gt; "Москве".

#### Example

[](#example-1)

```
use Landlib\RusLexicon;
echo RusLexicon::getCityNameFor_In_the_City('Москва') . "\n";	//> Москве
echo RusLexicon::getCityNameFor_In_the_City('Краснодарский') . ' ' . RusLexicon::getCityNameFor_In_the_City('край') . "\n";
//> Краснодарском крае
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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/0c515a68fa757958c4b37cf7c3083ad210d9be2a6059b7a255bd8c23856abfe0?d=identicon)[lamzin](/maintainers/lamzin)

---

Top Contributors

[![lamzin-andrey](https://avatars.githubusercontent.com/u/7406021?v=4)](https://github.com/lamzin-andrey "lamzin-andrey (9 commits)")

### Embed Badge

![Health badge](/badges/landlib-ruslexicon/health.svg)

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

PHPackages © 2026

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