serhii/short-number

For changing the language you want to call `set` method once before calling other methods from this package.

Maintainers

Package info

github.com/short-number/short-number

pkg:composer/serhii/short-number

Transparency log

Statistics

Installs: 3 245

Dependents: 0

Suggesters: 0

Stars: 6

Open Issues: 1

4.3.0 2025-11-27 08:37 UTC

README

Short number Total Downloads License

Lightweight package shortens given number to a short representation of it. For example 1234 will be formatted to 1k and 20244023 to 20m. Package supports multiple languages and can be easily extended with new languages.

Follow the full documentation for this package

Quick Start

composer require serhii/short-number

Supported Languages

Flag Language Code
πŸ‡¬πŸ‡§ English en
πŸ‡·πŸ‡Ί Russian ru
πŸ‡ΊπŸ‡¦ Ukrainian uk
πŸ‡¨πŸ‡³ Chinese zh
πŸ‡―πŸ‡΅ Japanese ja

License

The Short Number project is licensed under the MIT License

Contribute

With Container Engine

Build an Image

To build an image, navigate to the root of the project and run this command.

With Podman:

podman-compose build

With Docker:

docker compose build

Run the Container

To run a container, navigate to the root of the project and run this command.

With Podman:

podman-compose up -d

With Docker:

docker compose up -d

Enter the Container

Enter a container if you need to run composer.

With Podman:

podman-compose exec app bash

With Docker:

docker compose exec app bash

Cleanup

You can remove networks and cleanup by running this command.

With Podman:

podman-compose down

With Docker:

docker compose down