Skip to content

Commit

Permalink
Merge pull request #7 from omatech/translations
Browse files Browse the repository at this point in the history
set timeout
  • Loading branch information
moonibo authored Dec 10, 2024
2 parents 1122663 + 14cb737 commit 76fc98d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Admin/Accions/AdminGenerateTranslations.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ private function translateText($texts, $targetLang)
$targetLang = $targetLangMap[$targetLang] ?? $targetLang;

if(is_array($texts)) {
$results = $this->translator->translateText(array_values($texts), null, $targetLang);
$results = $this->translator->translateText(array_values($texts), null, $targetLang, ['timeout' => 100]);
return array_map(function ($result) {
return html_entity_decode($result->text);
}, $results);
}

$result = $this->translator->translateText($texts, null, $targetLang);
$result = $this->translator->translateText($texts, null, $targetLang, ['timeout' => 100]);
return html_entity_decode($result->text);


Expand Down

0 comments on commit 76fc98d

Please sign in to comment.