NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1868 most downloaded on Packagist
A language detection library for PHP. Detects the language from a given text string.
Latest stable
v5.3.1
Last release 2 years ago
no release in 18 months
Ships fairly regularly
a new release about every 8 months
Nearly every release is documented
notes for 19 of 21 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
21 releases · first in 2016
Drag across the ruler to compare, or tap a release to open it.
Explicitly marking parameters as nullable to support PHP 8.4 (thanks to @JoyceBabu)
Small performance improvement when used on large data sets (thanks to @Toflar)
Removed deprecation notices when using PHP 8.1
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Added occitan language file (thanks to @Mejans)
Users of PHP 7.2 should upgrade as soon as possible, as they may be exposed to unpatched security vulnerabilities.
This release will add support for PHP 8 and removes the support for PHP 7.2 (because it's end of life). Users of PHP 7.2 should upgrade as soon as possible, as they may be exposed to unpatched security vulnerabilities.
You can upgrade from version 4.y.z to 5.y.z without any problems if you are already using PHP 7.3 or higher.
Fixed Unsupported operand types for custom directory (thanks to @iquito)
Optimized performance by using PHP instead of JSON as a database file (thanks to @Pierstoval)
Note: The format of the resource files changed. You have to upgrade your JSON files to PHP. Please take a look at the upgrade guide for more information.
Updated to PHPUnit 8
Optimized performance by using fully-qualified function calls
Changed danish language code from dk to da.
Changed danish language code from dk to da.
Added serbian cyrylic and serbian latin
__toString returns always a string__toString returns always a stringAdded experimental support for custom directories. You can now specify your own path for translation files.
am) translationcs) translationlo) translationAdded the latest commits to the release.
Added the latest commits to the release.
Support for the languages Lingala, Sanskrit, Tonga and Urdu
Fixed typos for Lithuanian language sample
_langs.jsonphp-nightly in .travis.ymlFolder structure (renamed etc to resources)
CHANGELOG.mdCONTRIBUTING.mdetc to resources)README.md_langs.jsonFixed a bug that could produce slightly worse results.
Fixed a bug that could produce slightly worse results.
Changed the interface and added an IteratorAggregate interface to iterate over the results from LanguageResult easily.
Changed the interface and added an IteratorAggregate interface to iterate over the results from LanguageResult easily.
Added several new languages. It can now recognize 106 languages.
Added several new languages. It can now recognize 106 languages.
Nothing published for this version
Nothing published for this version
One column per quarter.