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

ActiveMouf-library[Localization &amp; i18n](/categories/localization)

mouf/utils.i18n.fine.language-detection
=======================================

Language detection is a PHP internationalisation package, it depends of translation-interface. This package contain many class to return a language select for internationalisation. It's could be with : Browser detection, fix language, data set in session, a link between domain name and language or a cascading of many solutions. The language can be used to translate message in fin or whatever.

4.0.x-dev(7y ago)117.8k2[4 issues](https://github.com/thecodingmachine/utils.i18n.fine.language-detection/issues)3MITPHPPHP &gt;=5.4.0

Since Mar 7Pushed 7y ago6 watchersCompare

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

READMEChangelogDependencies (3)Versions (1)Used By (3)

Internationalisation with FINE
==============================

[](#internationalisation-with-fine)

[![Scrutinizer](https://camo.githubusercontent.com/a85624e254a14a45a24feafc4b2705d69cd4cc79d7172335ad311c6b75bd75e1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746865636f64696e676d616368696e652f7574696c732e6931386e2e66696e652e6c616e67756167652d646574656374696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d342e30)](https://camo.githubusercontent.com/a85624e254a14a45a24feafc4b2705d69cd4cc79d7172335ad311c6b75bd75e1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746865636f64696e676d616368696e652f7574696c732e6931386e2e66696e652e6c616e67756167652d646574656374696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d342e30)

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)

This package is automatically added with the utils.i18n.fine.common Edit your *composer.json* file, and add a dependency on \*mouf/utils.i18n.fine.langauge-detection.

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

```
	{
	    "require": {
	        "mouf/mouf": "~2.0",
	        "mouf/utils.i18n.fine.language-detection": "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

After this you can [create an instance](doc/install.md)

Language format
---------------

[](#language-format)

The language format is on 2 letters. If the language is not found this return null.

Implement your own language detection
-------------------------------------

[](#implement-your-own-language-detection)

Please read this [documentation](doc/create_class.md) or the [translation interface package](https://mouf-php.com/packages/mouf/utils.i18n.fine.translation-interface/doc/implementation.md)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% 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

2629d ago

### Community

Maintainers

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

---

Top Contributors

[![charlesc-TCM](https://avatars.githubusercontent.com/u/124873336?v=4)](https://github.com/charlesc-TCM "charlesc-TCM (3 commits)")[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (3 commits)")

---

Tags

i18nlanguagedetectioninternationalisation

### Embed Badge

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

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

###  Alternatives

[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

92421.6k26](/packages/tractorcow-silverstripe-fluent)[gettext/languages

gettext languages with plural rules

7530.3M11](/packages/gettext-languages)[aplus/language

Aplus Framework Language Library

2351.7M15](/packages/aplus-language)[vluzrmos/language-detector

Detect the language for your application using browser preferences, subdomains or route prefixes.

109554.8k3](/packages/vluzrmos-language-detector)[badinansoft/nova-language-switch

A Laravel Nova package to switch language in your application

26506.4k1](/packages/badinansoft-nova-language-switch)[inpsyde/multilingual-press

Simply THE multisite-based free open source plugin for your multilingual websites.

2414.0k1](/packages/inpsyde-multilingual-press)

PHPackages © 2026

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