Interface ITranslationProvider
Represents a multi-lingual translation engine. This can for instance be a translation memory or machine translation engine.
Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public interface ITranslationProvider
Properties
IsReadOnly
Gets a flag which indicates whether the translation provider or its underlying storage
are read-only. If this flag is true
, no data can be deleted, updated, or
added.
Declaration
bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Name
Gets the user-friendly name of this provider. It is not necessarily unique across the system.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
StatusInfo
Gets the status info for the provider.
Declaration
ProviderStatusInfo StatusInfo { get; }
Property Value
Type | Description |
---|---|
ProviderStatusInfo |
SupportsConcordanceSearch
Gets a flag which indicates whether the translation provider supports concordance search in the source or the target language. For more detailed information, see SupportsSourceConcordanceSearch and SupportsTargetConcordanceSearch.
Declaration
bool SupportsConcordanceSearch { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsDocumentSearches
Gets a flag which indicates whether the translation provider supports document searches and will take document (textual) context into account.
Declaration
bool SupportsDocumentSearches { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsFilters
Gets a flag which indicates whether the translation provider supports filters for text and attribute fields. If false, filters supplied in the search settings will be ignored.
Declaration
bool SupportsFilters { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsFuzzySearch
Gets a flag which indicates whether the translation provider supports fuzzy search.
This value should be false
if SupportsTranslation is false
.
Declaration
bool SupportsFuzzySearch { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsMultipleResults
Gets a flag which indicates whether the engine may return multiple results for a search. If false, at most one result (and translation proposal) will be computed.
Declaration
bool SupportsMultipleResults { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsPenalties
Gets a flag which indicates whether the translation provider supports penalties of various types. If false, all penalties supplied in the search settings will be ignored.
Declaration
bool SupportsPenalties { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsPlaceables
Gets a flag which indicates whether the translation provider supports the detection and handling of placeables, and will return them as part of the search result.
Declaration
bool SupportsPlaceables { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsScoring
Gets a flag which indicates whether the translation provider produces scored results in the rank between [minScore, 100]. If false, no scores will be computed.
Declaration
bool SupportsScoring { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsSearchForTranslationUnits
Gets a flag which indicates whether the translation provider supports searching for bilingual input TUs (i.e. the SearchTranslationUnit method group). If false, the service only supports searching for simple (monolingual) segments.
Declaration
bool SupportsSearchForTranslationUnits { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsSourceConcordanceSearch
Gets a flag which indicates whether the translation provider supports concordance search in the source language.
Declaration
bool SupportsSourceConcordanceSearch { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsStructureContext
Gets a flag which indicates whether the translation provider supports a structure context specification and will consider it for searches. If false, the structure context will be ignored.
Declaration
bool SupportsStructureContext { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsTaggedInput
Gets a flag which indicates whether or not the translation provider engine supports processing of tagged input and will return input tags in the translation proposals. If false, the engine may drop all tags from search segments, and may not return tags in the output.
Declaration
bool SupportsTaggedInput { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsTargetConcordanceSearch
Gets a flag which indicates whether the translation provider supports concordance search in the target language.
Declaration
bool SupportsTargetConcordanceSearch { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsTranslation
Gets a flag which indicates whether the translation provider supports translation
search (exact and/or fuzzy search) and the generation of translation proposals. In most
cases this flag will be true
. If this
value is false
, the translation provider can not be used to request translations,
but can still be used to search for concordance matches, if SupportsConcordanceSearch
is true
.
Declaration
bool SupportsTranslation { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsUpdate
Gets a flag which indicates whether the translation provider supports updating/adding of translation units. If false, all update/add methods will return without effect. Note that implementations should not throw exceptions for unsupported methods.
Declaration
bool SupportsUpdate { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SupportsWordCounts
Gets a flag which indicates whether the translation provider will compute and return word counts in searches.
Declaration
bool SupportsWordCounts { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
TranslationMethod
Gets the primary method how the translation provider generates translations.
Declaration
TranslationMethod TranslationMethod { get; }
Property Value
Type | Description |
---|---|
TranslationMethod |
Uri
Gets a URI which uniquely identifies this translation provider.
Declaration
Uri Uri { get; }
Property Value
Type | Description |
---|---|
System.Uri |
Methods
GetLanguageDirection(LanguagePair)
Gets a translation provider for the specified language direction.
Declaration
ITranslationProviderLanguageDirection GetLanguageDirection(LanguagePair languageDirection)
Parameters
Type | Name | Description |
---|---|---|
LanguagePair | languageDirection | The language direction. |
Returns
Type | Description |
---|---|
ITranslationProviderLanguageDirection | The language direction matching the given source and target language. |
LoadState(String)
Loads previously serialized state information into this translation provider instance.
Declaration
void LoadState(string translationProviderState)
Parameters
Type | Name | Description |
---|---|---|
System.String | translationProviderState | A string representing the state of translation provider that was previously saved using SerializeState(). |
Remarks
The format of this string can be decided upon by the translation provider implementation.
RefreshStatusInfo()
Ensures that the provider's status information (StatusInfo) is refreshed, in case it is cached.
Declaration
void RefreshStatusInfo()
SerializeState()
Serializes any meaningful state information for this translation provider that can be stored in projects and sent around the supply chain.
Declaration
string SerializeState()
Returns
Type | Description |
---|---|
System.String | A string representing the state of this translation provider that can later be passed into the LoadState(String) method to restore the state after creating a new translation provider. |
Remarks
The format of this string can be decided upon by the translation provider implementation.
SupportsLanguageDirection(LanguagePair)
Checks whether this translation provider supports the specified language direction.
Declaration
bool SupportsLanguageDirection(LanguagePair languageDirection)
Parameters
Type | Name | Description |
---|---|---|
LanguagePair | languageDirection | The language direction. |
Returns
Type | Description |
---|---|
System.Boolean | True if the specified language direction is supported. |