language-detection
This library uses N-grams to accurately detect text language, supporting 110 languages with options for custom language addition and configuration. It requires PHP 7.4 and the Multibyte String extension, and provides guidance for upgrading from version 3 to 4.