PHP code example of maartenpaauw / laravel-fluent-translations
1. Go to this page and download the library: Download maartenpaauw/laravel-fluent-translations library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
maartenpaauw / laravel-fluent-translations example snippets
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(),
];