Ennexa / fluent-php

PHP Bindings for Project Fluent's Rust implementation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

PHP Bindings for Project Fluent's Rust implementation.

License:GNU General Public License v3.0


Languages

Language:PHP 89.9%Language:Rust 9.5%Language:Dockerfile 0.5%Language:Batchfile 0.1%