PHP 클래스 Swiftriver\GoogleLanguageServiceInterface\DetectionAndTranslationWorkflow

파일 보기 프로젝트 열기: ushahidi/Swiftriver-2011

공개 메소드들

메소드 설명
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