patrickschur/language-detection
Detect the language of any text in Laravel/PHP with fast, lightweight language identification. Supports multiple languages, simple API, and easy framework integration—ideal for auto-tagging content, localization workflows, and routing based on user input.
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.
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.
Changed danish language code from dk to da.
__toString returns always a stringAdded the latest commits to the release.
CHANGELOG.mdCONTRIBUTING.mdetc to resources)README.md_langs.jsonFixed a bug that could produce slightly worse results.
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 new languages
How can I help you explore Laravel packages today?