maartenpaauw/laravel-fluent-translations

This package is abandoned and no longer maintained. No replacement package was suggested.

This is my package laravel-fluent-translations

v1.0.1 2022-10-22 19:03 UTC

This package is auto-updated.

Last update: 2023-09-03 19:37:02 UTC


README

Latest Version on Packagist Tests Total Downloads

This package will help you to create fluent translation messages

Installation

You can install the package via composer:

composer require maartenpaauw/laravel-fluent-translations

Usage

use Maartenpaauw\Translation\Translation;

return [
    'apples' => Translation::singular('There is one apple')
        ->plural('There are many apples')
        ->toString(),
        
    'oranges' => Translation::exact(0, 'There are none')
        ->range(1, 19, 'There are some')
        ->from(20, 'There are many')
        ->toString(),
];

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.