/fluent-php

PHP Bindings for Project Fluent's Rust implementation.

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

fluent-php

Experimental PHP Bindings for Project Fluent's Rust implementation.

Example

<?php

$resource = <<<'FTL'
    hello = Hello, world!
    FTL;

try {
    $bundle = new FluentPhp\FluentBundle('en');
    $bundle->addResource($resource);
    $response = $bundle->formatPattern('hello', []);
    var_dump($response);
} catch (\Exception $e) {
    print_r($e);
}

See examples/ directory for advanced code samples.

License

GPL-3.0