PHPackages                             mouf/utils.i18n.fine.common - 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. mouf/utils.i18n.fine.common

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

mouf/utils.i18n.fine.common
===========================

This package contains the class to cascade the translation, default instance and the interface for fine ui.

4.0.x-dev(9y ago)017.8k3[3 issues](https://github.com/thecodingmachine/utils.i18n.fine.common/issues)5MITPHPPHP &gt;=5.4.0

Since Oct 3Pushed 9y ago16 watchersCompare

[ Source](https://github.com/thecodingmachine/utils.i18n.fine.common)[ Packagist](https://packagist.org/packages/mouf/utils.i18n.fine.common)[ Docs](https://mouf-php.com/mouf/utils.i18n.fine.common)[ RSS](/packages/mouf-utilsi18nfinecommon/feed)WikiDiscussions 4.0 Synced 1mo ago

READMEChangelogDependencies (2)Versions (1)Used By (5)

What is this package
====================

[](#what-is-this-package)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0a9dd0cf7fa041e61202673a36f5bc5cb6df9acefbabfe39bf42902e4c37f292/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746865636f64696e676d616368696e652f7574696c732e6931386e2e66696e652e636f6d6d6f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d342e30)](https://scrutinizer-ci.com/g/thecodingmachine/utils.i18n.fine.common/?branch=4.0)[![SensioLabsInsight](https://camo.githubusercontent.com/ac6eb3c16e9b8f0a269e0af89240f544e6644c8cd7a678f9db413cb1d9091f2b/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f61323038313239612d303737362d346331312d623763662d6665636236663935376465662f736d616c6c2e706e67)](https://insight.sensiolabs.com/projects/a208129a-0776-4c11-b7cf-fecb6f957def)

If you are not familiar with Fine, you should stop reading **right now**! Please [get started with the main presentation](http://mouf-php.com/packages/mouf/utils.i18n.fine.translation-interface/README.md).

Language detection is a PHP internationalisation package, it depends of translation-interface package. This package contains many class to return the selected language for internationalisation.

It's could be with :

- Browser detection,
- fix language,
- data set in session,
- a link between domain name and language
- a cascading of many solutions.

The language can be used to translate message in fine or whatever.

Dependencies
------------

[](#dependencies)

Fine comes as a *Composer* package and requires the "Mouf" framework to run. The first step is therefore to [install Mouf](http://www.mouf-php.com/).

Once Mouf is installed, you can process to the Fine installation.

Install Fine
------------

[](#install-fine)

At the same time please add a translation store system link utils.i18n.fine.file-translator, or another. Edit your *composer.json* file, and add a dependency on *mouf/utils.i18n.fine.common*.

A minimal *composer.json* file might look like this:

```
	{
	    "require": {
	        "mouf/mouf": "~2.0",
	        "mouf/utils.i18n.fine.common": "4.0.*"
	    },
	    "autoload": {
	        "psr-0": {
	            "Test": "src/"
	        }
	    },
	    "minimum-stability": "dev"
	}

```

As explained above, Fine is a package of the Mouf framework. Mouf allows you (amoung other things) to visualy "build" your project's dependencies and instances.

To install the dependency, run

```
php composer.phar install

```

This package contains
---------------------

[](#this-package-contains)

\###Installer

[The installer creates a default instance and automatically binds the translator.](doc/install.md)

\###Default class

This package adds a fine cascading translator to bind many instances of `TranslatorInterface`. The first translation found is returned, also the next translation is checked. Edit the instance in Mouf to add or change the order in cascading translator.

\###Functions

There are 2 functions added to make translations easier:

- `iMsg` function: Returns the translation of the key, parameters (in option) and LanguageDetection (in option)
- `eMsg` function: Do an echo of `iMsg`

[Read the documentation to use it](doc/using.md)

\###Interface

The interface `EditTranslationInterface` can be implemented to use the Mouf interface on the translator. Many new methods must be implemented to recover, save and edit a translation. [Read the documentation](doc/implement.md)

\###Trait

You can use this trait to implement some method of the interface.

### Twig extension

[](#twig-extension)

This package contains the `FineTwigExtension` that will add the `t` filter to your Twig templates.

Use like this:

```
{{ "my_key"| t }}
```

Please notice that the `FineTwigExtension` is appended to your Mouf instances only if a twig instance is already available in Mouf. If this package was installed *before* the *mouf/html.renderer.twig-exentensions* package, you might need to re-run the installer to installer the extension.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3513d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104771?v=4)[mouf](/maintainers/mouf)[@Mouf](https://github.com/Mouf)

---

Top Contributors

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

---

Tags

i18ntranslationcommonmouf

### Embed Badge

![Health badge](/badges/mouf-utilsi18nfinecommon/health.svg)

```
[![Health](https://phpackages.com/badges/mouf-utilsi18nfinecommon/health.svg)](https://phpackages.com/packages/mouf-utilsi18nfinecommon)
```

###  Alternatives

[jenssegers/date

A date library to help you work with dates in different languages

1.8k11.2M80](/packages/jenssegers-date)[gettext/gettext

PHP gettext manager

70530.2M102](/packages/gettext-gettext)[fightbulc/moment

Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired by moment.js

9693.2M10](/packages/fightbulc-moment)[jms/translation-bundle

Puts the Symfony Translation Component on steroids

42510.8M63](/packages/jms-translation-bundle)[lexik/translation-bundle

This bundle allows to import translation files content into the database and provide a GUI to edit translations.

4362.7M19](/packages/lexik-translation-bundle)[sonata-project/translation-bundle

SonataTranslationBundle

771.7M10](/packages/sonata-project-translation-bundle)

PHPackages © 2026

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