PHPackages                             tacoberu/nette-fluent-translator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. tacoberu/nette-fluent-translator

ActiveLibrary[Localization &amp; i18n](/categories/localization)

tacoberu/nette-fluent-translator
================================

Nette adapter for PHP implementation of Project Fluent.

v1.1.4(3y ago)22.8kMITPHPPHP &gt;=7.4CI failing

Since Feb 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/tacoberu/nette-fluent-translator)[ Packagist](https://packagist.org/packages/tacoberu/nette-fluent-translator)[ RSS](/packages/tacoberu-nette-fluent-translator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (14)Used By (0)

Nette adapter for Fluent localization
=====================================

[](#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
--------------------

[](#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](http://projectfluent.org/fluent/guide/) in order to learn more about the syntax. If you're a tool author you may be interested in the formal [EBNF grammar](https://github.com/projectfluent/fluent/tree/master/spec).

Installation
------------

[](#installation)

The recommended way to install is via Composer:

```
    composer require tacoberu/nette-fluent-translator

```

Usage
-----

[](#usage)

Sample flt localation file

```
-brand-name = Foo 3000
welcome = Welcome, {$name}, to {-brand-name}!
greet-by-name = Hello, { $name }!
form-title = Title
```

neon configuration

```
extensions:
    translation: Taco\NetteFluentTranslator\Extension(%appDir%/locales)

translation:
	defaultLocale: cs_CZ
	supportedLocales:
		- cs_CZ
		- fr_FR
		- en_GB
```

In php code:

```
$translator = $container->getService('translator');

dump($translator->translate('-brand-name'));
// "Foo 3000"

dump($translator->translate('welcome', ['name' => 'Anne']));
// "Welcome, Anne, to Foo 3000!"

dump($translator->translate('greet-by-name', ['name' => 'Anne']));
// "Hello, Anne!"

This means, for example:

```php
function beforeRender()
{
	$this->template->setTranslator($this->context->getByType(Nette\Localization\ITranslator::class));
}
```

and

```
$form = new UI\Form($this, $name);
$form->setTranslator($this->context->getByType(Localization\ITranslator::class));
$form->addText('title', 'form-title');
```

In Latte template:

```
{_"-brand-name"}
{_"welcome", ["name" => "Anne"]}
{_"greet-by-name", ["name" => "Anne"]}
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~101 days

Recently: every ~0 days

Total

12

Last Release

1148d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.3

v1.1.1PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d9535bc57ab9e7c844b76be57d024b97eb84e9f8a9d308537afffe9cf81c409?d=identicon)[tacoberu](/maintainers/tacoberu)

---

Top Contributors

[![tacoberu](https://avatars.githubusercontent.com/u/1828339?v=4)](https://github.com/tacoberu "tacoberu (4 commits)")

---

Tags

localizationinternationalizationi18nlanguagel10nnettefluentlocaleftlfluentproject

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tacoberu-nette-fluent-translator/health.svg)

```
[![Health](https://phpackages.com/badges/tacoberu-nette-fluent-translator/health.svg)](https://phpackages.com/packages/tacoberu-nette-fluent-translator)
```

###  Alternatives

[aplus/language

Aplus Framework Language Library

2351.7M15](/packages/aplus-language)[gettext/languages

gettext languages with plural rules

7530.3M11](/packages/gettext-languages)[jrmajor/fluent

Fluent localization system for PHP

2716.9k5](/packages/jrmajor-fluent)[jrmajor/laravel-fluent

Fluent translations for Laravel

208.4k](/packages/jrmajor-laravel-fluent)[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

92421.6k26](/packages/tractorcow-silverstripe-fluent)[delight-im/i18n

Internationalization and localization for PHP

625.2k3](/packages/delight-im-i18n)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
