1. Go to this page and download the library: Download jrmajor/fluent 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/ */
jrmajor / fluent example snippets
$bundle->message('stream.shared-photos', [
'userName' => 'jrmajor',
'photoCount' => 2,
'userGender' => 'male',
]); // jrmajor added 2 new photos to his stream.
use Major\Fluent\Parser\FluentParser;
$parser = new FluentParser(strict: true);
$resource = $parser->parse('hello-user = Hello, { $userName }!');
use Major\Fluent\Bundle\FluentBundle;
$bundle = new FluentBundle('en', strict: true);
$bundle->addResource($resource);
// or
$bundle->addFtl('hello-user = Hello, { $userName }!');
$bundle->message('hello-user', userName: 'World'); // Hello, World!