From 0380a3e216dde2a0680baf802f21882f02e46802 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 19 Apr 2022 06:16:44 +0000 Subject: [PATCH] Fix: The language detection only searched for farsi --- src/Model/Item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 09890ab2c9..34f7e0d8b8 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1751,7 +1751,7 @@ class Item // which point it will be automatically available through `getAvailableLanguages()` and this should be removed. $availableLanguages['fa'] = 'fa'; - $ld = new Language($availableLanguages); + $ld = new Language(array_keys($availableLanguages)); $languages = $ld->detect($naked_body)->limit(0, 3)->close(); if (is_array($languages)) { return json_encode($languages); -- 2.39.5