Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Language Detection Laravel Package

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.

View on GitHub
Deep Wiki
Context7
v5.3.1
  • Explicitly marking parameters as nullable to support PHP 8.4 (thanks to @JoyceBabu)
v5.3.0
  • Small performance improvement when used on large data sets (thanks to @Toflar)
  • Added Malayalam language file (thanks to @JoyceBabu)
v5.2.0
  • Removed deprecation notices when using PHP 8.1 (#49)
  • Removed support for PHP 7.3 because it's no longer supported
v5.1.0
  • Added occitan language file (thanks to @Mejans)
v5.0.0

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.

Added

Removed

  • PHP 7.2 support as it is no longer supported
v4.0.1
  • Fixed Unsupported operand types for custom directory (thanks to @iquito)
v4.0.0
  • 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.

v3.4.2
  • Updated to PHPUnit 8
v3.4.1
  • Optimized performance by using fully-qualified function calls
  • Updated to PHP 7.2
  • Removed echo from Trainer class
v3.4.0

Changed danish language code from dk to da.

v3.3.0
  • Added serbian cyrylic and serbian latin
  • The method __toString returns always a string
v3.2.0
  • Added experimental support for custom directories. You can now specify your own path for translation files.
  • Added credits for the translation files.
  • Corrections for Amharic, Czech and Lao translation.
v3.1.1

Added the latest commits to the release.

v3.1.0

Added

  • Support for the languages Lingala, Sanskrit, Tonga and Urdu
v3.0

Added

  • CHANGELOG.md
  • CONTRIBUTING.md
  • Tokenizer interface

Changed

  • Folder structure (renamed etc to resources)
  • Renamed all language files (added .txt extension)
  • Improved performance
  • Updated to PHPUnit 6
  • Updated README.md

Removed

  • Autoloader script
  • Language model _langs.json
v2.1.1
  • Fixed typos for Lithuanian language sample
  • Fixed wrong ISO 639-1 codes
v2.1

Fixed a bug that could produce slightly worse results.

v2.0

Changed the interface and added an IteratorAggregate interface to iterate over the results from LanguageResult easily.

v1.2

Added several new languages. It can now recognize 106 languages.

v1.1

Added new languages

v1.0
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
phalcon/cli-options-parser
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi