PHPackages                             nasution/lang-detector - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nasution/lang-detector

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nasution/lang-detector
======================

Detect user language

0.0.1(9y ago)041MITPHPPHP &gt;= 5.3.3

Since Aug 16Pushed 9y agoCompare

[ Source](https://github.com/mul14/lang-detector)[ Packagist](https://packagist.org/packages/nasution/lang-detector)[ Docs](https://github.com/mul14/lang-detector)[ RSS](/packages/nasution-lang-detector/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Language Detector
=================

[](#language-detector)

This is just very simple language detector by using `$_SERVER['HTTP_ACCEPT_LANGUAGE']`. The output will be standard [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1).

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

[](#installation)

```
composer require nasution/lang-detector

```

Usage
-----

[](#usage)

```
require 'vendor/autoload.php';

use Nasution\LangDetector;

echo LangDetector::detect(); // Output: id, en, it, ja, my, ms.
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

3606d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d28dcc1dfa9e49fbf6c1ef5f7aa209b1b95c8deee9567201c3d02c556606388?d=identicon)[mul14](/maintainers/mul14)

---

Top Contributors

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

---

Tags

language-detectorlaravel-packagelanguage

### Embed Badge

![Health badge](/badges/nasution-lang-detector/health.svg)

```
[![Health](https://phpackages.com/badges/nasution-lang-detector/health.svg)](https://phpackages.com/packages/nasution-lang-detector)
```

###  Alternatives

[phpoption/phpoption

Option Type for PHP

2.7k566.1M169](/packages/phpoption-phpoption)[patrickschur/language-detection

A language detection library for PHP. Detects the language from a given text string.

8533.5M20](/packages/patrickschur-language-detection)[wapmorgan/morphos

A morphological solution for Russian and English language written completely in PHP. Provides classes to inflect personal names, geographical names, decline and pluralize nouns, generate cardinal and ordinal numerals, spell out money amounts and time.

8261.3M7](/packages/wapmorgan-morphos)[coderello/laravel-nova-lang

Language support for Laravel Nova.

4261.3M2](/packages/coderello-laravel-nova-lang)[snipe/banbuilder

Library to easily handle profanity filtering in PHP projects.

3291.6M3](/packages/snipe-banbuilder)[landrok/language-detector

A fast and reliable PHP library for detecting languages

132696.7k11](/packages/landrok-language-detector)

PHPackages © 2026

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