Merge pull request #11422 from annando/language

Fix: The language detection only searched for farsi
This commit is contained in:
Philipp 2022-04-19 10:26:04 +02:00 committed by GitHub
commit 6617b6c088
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);