Versions in this module Expand all Collapse all v1 v1.0.6 Oct 14, 2024 Changes in this version type Option + func WithDeeplProSession(dlSession string) Option + func WithTagHandling(handingType TagHandlingType) Option + type TagHandlingType int + const TagHandlingHtml + const TagHandlingXml type TextTranslationJsonRpcRequestParams + TagHandling string v1.0.5 Jan 26, 2024 Changes in this version type Option + func WithHttpProxyEx(proxy string, ignoreSSLVerification bool) Option + func WithSocket5ProxyEx(socket5Proxy string, userName string, password string, ...) Option v1.0.4 Jan 19, 2024 v1.0.3 Jan 5, 2024 Changes in this version + var ErrorInvalidResponse = errors.New("invalid response") + var ErrorInvalidTargetLang = errors.New("invalid Target Lang") + var ErrorNoTranslateTextFound = errors.New("no Translate Text Found") + var ErrorTooManyRequests = errors.New("too Many Requests") + type CommonJobParameters struct + RegionalVariant string + TranscribeAS string + WasSpoken bool + type ErrorInfo struct + ErrorCode int + type JsonRpcRequest struct + Id int64 + Jsonrpc string + Method string + Params TextTranslationJsonRpcRequestParams + type JsonRpcResponse struct + ErrorInfo *ErrorInfo + Id int64 + Jsonrpc string + Result TextTranslationJsonResponse + func Translate(sourceLanguage, targetLanguage, textToTranslate string, options ...Option) (jsonRpcResponse *JsonRpcResponse, err error) + type Lang struct + SourceLangUserSelected string + TargetLang string + type Option func(option *deepLClientOption) + func WithHttpProxy(proxy string) Option + func WithSocket5Proxy(socket5Proxy string, userName string, password string) Option + type Text struct + Text string + type TextParam struct + RequestAlternatives int + type TextTranslationJsonResponse struct + DetectedLanguages map[string]float64 + LanguageCode string + LanguageIsConfident bool + Texts []TextWithAlternatives + type TextTranslationJsonRpcRequestParams struct + CommonJobParams CommonJobParameters + Lang Lang + Splitting string + Texts []TextParam + Timestamp int64 + type TextWithAlternatives struct + Alternatives []Text