C# 클래스 MicrosoftTranslatorManager, SmartLocalization

파일 보기 프로젝트 열기: NiklasBorglund/SmartLocalization 1 사용 예제들

공개 메소드들

메소드 설명
AcceptAllCertifications ( object sender, System certification, System chain, System sslPolicyErrors ) : bool
GetAccessToken ( string cliendID, string clientSecret ) : void

Gets the access token.(Async) will set the IsInitialized Variable when done

TranslateArray ( List textsToTranslate, string languageFrom, string languageTo, List keys, TranslateCompleteArrayCallback callbackMethod ) : void
TranslateText ( string textToTranslate, string languageFrom, string languageTo, string key, TranslateCompleteCallback callbackMethod ) : void

Translates the text.

비공개 메소드들

메소드 설명
GetAllTranslationLanguages ( ) : void

Gets a list of all the languages available in the Microsoft Translator API

GetResponseCallback ( IAsyncResult ar ) : void

Gets the response callback for authentication

RequestStreamReady ( IAsyncResult ar ) : void

Makes the request to the server for the authorization.

TranslationReady ( IAsyncResult ar ) : void

Recieves the translation and invokes the callback method sending the translated value

메소드 상세

AcceptAllCertifications() 공개 메소드

public AcceptAllCertifications ( object sender, System certification, System chain, System sslPolicyErrors ) : bool
sender object
certification System
chain System
sslPolicyErrors System
리턴 bool

GetAccessToken() 공개 메소드

Gets the access token.(Async) will set the IsInitialized Variable when done
public GetAccessToken ( string cliendID, string clientSecret ) : void
cliendID string /// Cliend I. ///
clientSecret string /// Client secret. ///
리턴 void

TranslateArray() 공개 메소드

public TranslateArray ( List textsToTranslate, string languageFrom, string languageTo, List keys, TranslateCompleteArrayCallback callbackMethod ) : void
textsToTranslate List
languageFrom string
languageTo string
keys List
callbackMethod TranslateCompleteArrayCallback
리턴 void

TranslateText() 공개 메소드

Translates the text.
public TranslateText ( string textToTranslate, string languageFrom, string languageTo, string key, TranslateCompleteCallback callbackMethod ) : void
textToTranslate string /// Text to translate. ///
languageFrom string /// Language from. ///
languageTo string /// Language to. ///
key string /// Key. This value will be returned in the callback ///
callbackMethod TranslateCompleteCallback /// Callback method. ///
리턴 void