maartenpaauw / laravel-fluent-translations
This is my package laravel-fluent-translations
Fund package maintenance!
maartenpaauw
Requires
- php: ^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- pestphp/pest: ^1.20
- spatie/ray: ^1.28
README
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.