Looking to hire Laravel developers? Try LaraJobs

laravel-fluent-translations maintained by maartenpaauw

Description
This is my package laravel-fluent-translations
Author
Last update
2023/07/03 21:23 (dev-main)
License
Downloads
7

Comments
comments powered by Disqus

Laravel fluent translations

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.