Skip to content

Commit

Permalink
Merge pull request #669 from mesa57/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mesa57 committed Feb 28, 2021
2 parents 3b8e743 + b3e73d2 commit 16ef0c0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/services/Translation/Services_Translation_Microsoft.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class Services_Translation_Microsoft
{
// actual translation URL
const translateUrl = 'https://api.cognitive.microsofttranslator.com/translate?api-version=3.0';
const translateUrl = 'https://api.cognitive.microsofttranslator.com/translate?api-version=3.0';
// oAuth url
const authUrl = 'https://westeurope.api.cognitive.microsoft.com/sts/v1.0/issueToken';
// subscription key headers
Expand All @@ -12,7 +12,7 @@ class Services_Translation_Microsoft
/*
* These id's need to be copied from the Azure market place, please
* check the following
* https://azure.microsoft.com/nl-nl/services/cognitive-services/translator/#pricing
* https://azure.microsoft.com/nl-nl/services/cognitive-services/translator/#pricing
*/
private $_subscriptionKey = '';

Expand Down Expand Up @@ -93,12 +93,12 @@ public function translateSingle($dstLanguage, $text)
{
return false; // function not used anymore
}
// translateSingle

// translateSingle

/*
* translate a list of body's
*/
* translate a list of body's
*/
public function translateMultiple($dstLanguage, $list, $field)
{
/*
Expand Down Expand Up @@ -132,11 +132,12 @@ public function translateMultiple($dstLanguage, $list, $field)
$list[$listCounter][$field.'_translated'] = (string) $l->translations[0]->text;
$listCounter++;
}

return $list;
} else {
return false;
}
}
// translateMultiple

// translateMultiple
} // class Services_Translation_Microsoft

0 comments on commit 16ef0c0

Please sign in to comment.