Configuration for the number of languages
This commit is contained in:
parent
5ae0331993
commit
ec16e7c0e6
|
@ -186,7 +186,7 @@ class Relay
|
||||||
|
|
||||||
$detected = [];
|
$detected = [];
|
||||||
$quality = DI::config()->get('system', 'relay_language_quality');
|
$quality = DI::config()->get('system', 'relay_language_quality');
|
||||||
foreach (Item::getLanguageArray($body, 10, $uri_id, $author_id) as $language => $reliability) {
|
foreach (Item::getLanguageArray($body, DI::config()->get('system', 'relay_languages'), $uri_id, $author_id) as $language => $reliability) {
|
||||||
if (($reliability >= $quality) && ($quality > 0)) {
|
if (($reliability >= $quality) && ($quality > 0)) {
|
||||||
$detected[] = $language;
|
$detected[] = $language;
|
||||||
}
|
}
|
||||||
|
|
|
@ -566,6 +566,10 @@ return [
|
||||||
// Minimum value for the language detection quality for relay posts. The value must be betweeen 0 and 1.
|
// Minimum value for the language detection quality for relay posts. The value must be betweeen 0 and 1.
|
||||||
'relay_language_quality' => 0,
|
'relay_language_quality' => 0,
|
||||||
|
|
||||||
|
// relay_languages (Integer)
|
||||||
|
// Number of languages that are used per post to check for acceptable posts.
|
||||||
|
'relay_languages' => 10,
|
||||||
|
|
||||||
// session_handler (database|cache|native)
|
// session_handler (database|cache|native)
|
||||||
// Whether to use Cache to store session data or to use PHP native session storage.
|
// Whether to use Cache to store session data or to use PHP native session storage.
|
||||||
'session_handler' => 'database',
|
'session_handler' => 'database',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user