Download the PHP package tacoberu/nette-fluent-translator without Composer
On this page you can find all versions of the php package tacoberu/nette-fluent-translator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tacoberu/nette-fluent-translator
More information about tacoberu/nette-fluent-translator
Files in tacoberu/nette-fluent-translator
Package nette-fluent-translator
Short Description Nette adapter for PHP implementation of Project Fluent.
License MIT
Informations about the package nette-fluent-translator
Nette adapter for Fluent localization
This is a Nette adapter for PHP implementation of Project Fluent, a localization framework designed to unleash the entire expressive power of natural language translations.
Project Fluent keeps simple things simple and makes complex things possible. The syntax used for describing translations is easy to read and understand. At the same time it allows, when necessary, to represent complex concepts from natural languages like gender, plurals, conjugations, and others.
Learn the FTL syntax
FTL is a localization file format used for describing translation resources. FTL stands for Fluent Translation List.
FTL is designed to be simple to read, but at the same time allows to represent complex concepts from natural languages like gender, plurals, conjugations, and others.
hello-user = Hello, { $username }!
Read the Fluent Syntax Guide in order to learn more about the syntax. If you're a tool author you may be interested in the formal EBNF grammar.
Installation
The recommended way to install is via Composer:
composer require tacoberu/nette-fluent-translator
Usage
Sample flt localation file
neon configuration
In php code: php function beforeRender() { $this->template->setTranslator($this->context->getByType(Nette\Localization\ITranslator::class)); } html {"-brand-name"} {"welcome", ["name" => "Anne"]} {_"greet-by-name", ["name" => "Anne"]}