PHP Класс Swiftriver\GoogleLanguageServiceInterface\DetectionAndTranslationWorkflow

Показать файл Открыть проект

Открытые методы

Метод Описание
RunWorkflow ( Log $logger ) : Content When executed, this method will firstly attempt to identify the language that the content text is in. If this can not be done, then the workflow marks the language as unknown and returns the content. If a language is identified as being same as the base language, the text is marked with the language code and the content is returned. If the language is identified as something other than the base language, then translations are attempted and the translated text in the base language is added at position 0 to the content text collection while the original text is stored at position 1
__construct ( Content $content, string $referer, string $baseLanguageCode ) Constructor for this workflow

Приватные методы

Метод Описание
ExtractTextForLanguageDetection ( $languageSpecificText )

Описание методов

RunWorkflow() публичный Метод

When executed, this method will firstly attempt to identify the language that the content text is in. If this can not be done, then the workflow marks the language as unknown and returns the content. If a language is identified as being same as the base language, the text is marked with the language code and the content is returned. If the language is identified as something other than the base language, then translations are attempted and the translated text in the base language is added at position 0 to the content text collection while the original text is stored at position 1
public RunWorkflow ( Log $logger ) : Content
$logger Log
Результат Swiftriver\Core\ObjectModel\Content

__construct() публичный Метод

Constructor for this workflow
public __construct ( Content $content, string $referer, string $baseLanguageCode )
$content Swiftriver\Core\ObjectModel\Content
$referer string
$baseLanguageCode string