Class AbstractLocalTranslationMemory
Abstract base class for bilingual file-based (File
Inheritance
Inherited Members
Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public abstract class AbstractLocalTranslationMemory : ITranslationMemory, ITranslationProvider, ISupportPlaceables, ILocalTranslationMemory
Properties
Copyright
Gets or sets the copyright string for this translation memory.
Declaration
public string Copyright { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
You have to call Save() in order to perist changes to this property.
CreationDate
Gets the creation date of this translation memory.
Declaration
public DateTime CreationDate { get; set; }
Property Value
Type | Description |
---|---|
Date |
CreationUserName
Gets the creation user of this translation memory.
Declaration
public string CreationUserName { get; }
Property Value
Type | Description |
---|---|
String |
Description
Gets or sets a general description of the translation memory.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
You have to call Save() in order to perist changes to this property.
ExpirationDate
Gets or sets the expiration date for this translation memory.
Declaration
public DateTime? ExpirationDate { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Date |
Remarks
You have to call Save() in order to perist changes to this property.
FieldDefinitions
Gets the custom fields defined for this TM.
Declaration
public FieldDefinitionCollection FieldDefinitions { get; }
Property Value
Type | Description |
---|---|
Field |
Remarks
In case this is a server-based translation memory, which is associated with a fields template (see IFields
FuzzyIndexes
Gets or sets the set of fuzzy indices defined on this TM.
Declaration
public FuzzyIndexes FuzzyIndexes { get; set; }
Property Value
Type | Description |
---|---|
Fuzzy |
FuzzyIndexStatisticsRecomputedAt
Gets the time of the last fuzzy index statistics recomputation of this TM, if available.
Declaration
public DateTime? FuzzyIndexStatisticsRecomputedAt { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Date |
FuzzyIndexStatisticsSize
Gets the size of the TM at the point of the last fuzzy index statistics recomputation, if available.
Declaration
public int? FuzzyIndexStatisticsSize { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |
FuzzyIndexTuningSettings
Gets or sets the fuzzy index tuning settings for the TM.
Declaration
public FuzzyIndexTuningSettings FuzzyIndexTuningSettings { get; set; }
Property Value
Type | Description |
---|---|
Fuzzy |
IsReadOnly
Declaration
public virtual bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
Boolean |
LanguageDirection
Gets the one language direction contained in this translation memory.
Declaration
public ITranslationMemoryLanguageDirection LanguageDirection { get; }
Property Value
Type | Description |
---|---|
ITranslation |
LanguageResourceBundles
Gets the language resources which are associated with this TM.
Declaration
public LanguageResourceBundleCollection LanguageResourceBundles { get; }
Property Value
Type | Description |
---|---|
Language |
Remarks
In case this is a server-based translation memory, which is associated with a language resources template (see ILanguage
Name
Gets the name of the translation memory.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String |
Recognizers
Gets or sets the recognizers which are enabled for this TM.
Declaration
public BuiltinRecognizers Recognizers { get; set; }
Property Value
Type | Description |
---|---|
Builtin |
StatusInfo
Gets the status info for the provider.
Declaration
public abstract ProviderStatusInfo StatusInfo { get; }
Property Value
Type | Description |
---|---|
Provider |
SupportedLanguageDirections
Gets the list of language directions which are supported by this translation memory.
Declaration
public ReadOnlyCollection<LanguagePair> SupportedLanguageDirections { get; }
Property Value
Type | Description |
---|---|
Read |
SupportsConcordanceSearch
Supports
Declaration
public virtual bool SupportsConcordanceSearch { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsDocumentSearches
Supports
Declaration
public virtual bool SupportsDocumentSearches { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsFilters
Supports
Declaration
public virtual bool SupportsFilters { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsFuzzySearch
Supports
Declaration
public virtual bool SupportsFuzzySearch { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsMultipleResults
Supports
Declaration
public virtual bool SupportsMultipleResults { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsPenalties
Supports
Declaration
public virtual bool SupportsPenalties { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsPlaceables
Supports
Declaration
public virtual bool SupportsPlaceables { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsScoring
Supports
Declaration
public virtual bool SupportsScoring { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsSearchForTranslationUnits
Supports
Declaration
public virtual bool SupportsSearchForTranslationUnits { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsSourceConcordanceSearch
Supports
Declaration
public virtual bool SupportsSourceConcordanceSearch { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsStructureContext
Supports
Declaration
public virtual bool SupportsStructureContext { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsTaggedInput
Supports
Declaration
public virtual bool SupportsTaggedInput { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsTargetConcordanceSearch
Supports
true
if this translation memory has a word-based fuzzy index for the target language (see FuzzyDeclaration
public virtual bool SupportsTargetConcordanceSearch { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsTranslation
Supports
Declaration
public virtual bool SupportsTranslation { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsUpdate
Supports
Declaration
public virtual bool SupportsUpdate { get; }
Property Value
Type | Description |
---|---|
Boolean |
SupportsWordCounts
Supports
Declaration
public virtual bool SupportsWordCounts { get; }
Property Value
Type | Description |
---|---|
Boolean |
TranslationMethod
Translation
Declaration
public TranslationMethod TranslationMethod { get; }
Property Value
Type | Description |
---|---|
Translation |
Uri
Gets a URI which uniquely identifies this translation memory.
Declaration
public virtual Uri Uri { get; }
Property Value
Type | Description |
---|---|
Uri |
Methods
ClearFuzzyCache()
Clear the fuzzy cache of the TM
Declaration
public void ClearFuzzyCache()
CreateFileBasedTranslationMemoryLanguageDirection()
Abstract base class for bilingual file-based (File
Declaration
protected virtual FileBasedTranslationMemoryLanguageDirection CreateFileBasedTranslationMemoryLanguageDirection()
Returns
Type | Description |
---|---|
File |
Delete()
Deletes this translation memory.
Declaration
public void Delete()
Remarks
In the case of a file-based translation memory, this deletes the translation memory file itself.
GetLanguageDirection(LanguagePair)
Gets a specified translation memory language direction.
Declaration
public ITranslationMemoryLanguageDirection GetLanguageDirection(LanguagePair languageDirection)
Parameters
Type | Name | Description |
---|---|---|
Language |
languageDirection | The language direction. |
Returns
Type | Description |
---|---|
ITranslation |
A translation provider for the specified language direction, or null if no language direction matches. |
GetTranslationUnitCount()
Gets the total translation unit count for all language directions in this translation memory.
Declaration
public int GetTranslationUnitCount()
Returns
Type | Description |
---|---|
Int32 | The total translation unit count for this TM. |
HasPermission(String)
Checks whether the current user has the specified permission on this translation memory.
Declaration
public abstract bool HasPermission(string permission)
Parameters
Type | Name | Description |
---|---|---|
String | permission | A permission ID. See Translation |
Returns
Type | Description |
---|---|
Boolean | True if the user has the speicfied permission for this TM. |
LoadState(String)
Loads previously serialized state information into this translation provider instance.
Declaration
public virtual void LoadState(string translationProviderState)
Parameters
Type | Name | Description |
---|---|---|
String | translationProviderState | A string representing the state of translation provider that was previously saved
using Serialize |
Remarks
The format of this string can be decided upon by the translation provider implementation.
RecomputeFuzzyIndexStatistics()
Synchronously recomputes the fuzzy index statistics of the TM.
Declaration
public void RecomputeFuzzyIndexStatistics()
Refresh()
Enforces the currently stored setup information to be refreshed. Note that this may initiate a full server/database roundtrip.
Declaration
public void Refresh()
RefreshStatusInfo()
Refreshes the current status information.
Declaration
public abstract void RefreshStatusInfo()
Save()
Saves changes made to properties of this translation memory.
Declaration
public void Save()
Save(IProgress<TranslationMemoryProgress>, CancellationToken)
Saves changes made to properties of this translation memory.
Declaration
public void Save(IProgress<TranslationMemoryProgress> progress, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IProgress<Translation |
progress | |
Cancellation |
cancellationToken |
SerializeState()
Serializes any meaningful state information for this translation provider that can be stored in projects and sent around the supply chain.
Declaration
public virtual string SerializeState()
Returns
Type | Description |
---|---|
String | A string representing the state of this translation provider that can later be passed into
the Load |
Remarks
The format of this string can be decided upon by the translation provider implementation.
ShouldRecomputeFuzzyIndexStatistics()
Gets a flag which indicates whether it is recommended to recompute the fuzzy
index statistics (see Recompute
Declaration
public bool ShouldRecomputeFuzzyIndexStatistics()
Returns
Type | Description |
---|---|
Boolean |
SupportsLanguageDirection(LanguagePair)
Checks whether this translation provider supports the specified language direction.
Declaration
public bool SupportsLanguageDirection(LanguagePair languageDirection)
Parameters
Type | Name | Description |
---|---|---|
Language |
languageDirection | The language direction. |
Returns
Type | Description |
---|---|
Boolean | True if the specified language direction is supported. |
Explicit Interface Implementations
ITranslationProvider.GetLanguageDirection(LanguagePair)
Gets a translation provider for the specified language direction.
Declaration
ITranslationProviderLanguageDirection ITranslationProvider.GetLanguageDirection(LanguagePair languageDirection)
Parameters
Type | Name | Description |
---|---|---|
Language |
languageDirection | The language direction. |
Returns
Type | Description |
---|---|
ITranslation |
The language direction matching the given source and target language. |