Click or drag to resize
ServerBasedTranslationMemoryLanguageDirection Class
Represents a language direction of a multilingual server-based translation memory (ServerBasedTranslationMemory).
Inheritance Hierarchy
SystemObject
  Sdl.LanguagePlatform.TranslationMemoryApiServerBasedTranslationMemoryLanguageDirection

Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi (in Sdl.LanguagePlatform.TranslationMemoryApi.dll) Version: 1.6.0.0 (1.14.4157.0)
Syntax
public class ServerBasedTranslationMemoryLanguageDirection : ITranslationMemoryLanguageDirection, 
	ITranslationProviderLanguageDirection

The ServerBasedTranslationMemoryLanguageDirection type exposes the following members.

Constructors
  NameDescription
Public methodServerBasedTranslationMemoryLanguageDirection
Creates a new, empty language direction.
Top
Properties
  NameDescription
Public propertyCachedTranslationUnitCount
Gets the cached total translation unit count for this language direction. This count is computed at regular intervals and when performing imports. To calculate the actual translation unit count, use GetTranslationUnitCount but bear in mind that this is a relatively expensive operation.
Public propertyCanReverseLanguageDirection
Gets a flag which indicates whether the translation provider supports searches in the reversed language direction.
Public propertySourceLanguage
Gets or sets the source language.
Public propertySourceLanguageCode
Gets or sets the source language code.
Public propertyTargetLanguage
Gets or sets the target language.
Public propertyTargetLanguageCode
Gets or sets the target language code.
Public propertyTranslationProvider
Gets the server-based translation memory to which this language direction belongs.
Top
Methods
  NameDescription
Public methodAddOrUpdateTranslationUnits
Adds an array of translation units to the database. If hash codes of the previous translations are provided, a found translation will be overwritten. If none is found, or the hash is 0 or the collection is null, the operation behaves identical to AddTranslationUnits(TranslationUnit, ImportSettings).

If the provider doesn't support adding/updating, the implementation should return a reasonable ImportResult but should not throw an exception.

Public methodAddOrUpdateTranslationUnitsMasked
Adds an array of translation units to the database, but will only add those for which the corresponding mask field is true. If the previous translation hashes are provided, existing translations will be updated if the target segment hash changed.

If the provider doesn't support adding/updating, the implementation should return a reasonable ImportResult but should not throw an exception.

Public methodAddTranslationUnit
Adds a translation unit to the database. If the provider doesn't support adding/updating, the implementation should return a reasonable ImportResult but should not throw an exception.
Public methodAddTranslationUnits
Adds an array of translation units to the database. If the provider doesn't support adding/updating, the implementation should return a reasonable ImportResult but should not throw an exception.
Public methodAddTranslationUnitsMasked
Adds an array of translation units to the database, but will only add those for which the corresponding mask field is true. If the provider doesn't support adding/updating, the implementation should return a reasonable ImportResult but should not throw an exception.
Public methodApplyFieldsToTranslationUnit
Applies the specified field values to the translation unit identified by the specified translationUnitId.
Public methodApplyFieldsToTranslationUnits
Applies the specified field values to the translation units identified by the specified translationUnitIds collection.
Public methodDeleteAllTranslationUnits
Deletes all translation units from the TM.
Public methodDeleteTranslationUnit
Deletes the translation unit with the specified translationUnitId from the TM.
Public methodDeleteTranslationUnits
Deletes the translation units with the specified IDs from the translation memory.
Public methodDeleteTranslationUnitsWithIterator
Deletes all translation units in the TM, using an iterator. The iterator will process only a fixed maximum number of translation units (MaxCount) and then the call will return, giving the client an opportunity to discontinue the process or update the UI before the next round-trip.

Optionally, a filter can be set on the iterator which then will only delete those TUs which satisfy the filter condition.

Public methodEditTranslationUnits
Applies an EditScript to the translation units identified by the identifiers in the translationUnitIds collection.
Public methodEditTranslationUnitsWithIterator
Applies an EditScript to the translation units, using an iterator.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetDuplicateTranslationUnits
Returns a set of potentially duplicated translation units in the TM, using a special DuplicateIterator. A group of TUs are considered potential duplicates of each other if the internal hash values for their source segments are identical. There may be several reasons for this being the case:
  • The TUs have the same source segment, but different translations
  • The TUs have different source segments, but only differ in complex tokens (controlled through the TM's Recognizers) which will result in the identical hash values,
  • The source segments only differ by whitespace or certain punctuation, which do not modify the hash values,
  • The hashing algorithm leads to collisions in which case the segments may be entirely different, but still result in the same hash value.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetTranslationUnit
Retrieves the translation unit with the specified translationUnitId from the translation memory.
Public methodGetTranslationUnitCount
Returns the number of translation units in this TM.
Public methodGetTranslationUnits
Retrieves a set of translation units, using an iterator. At most MaxCount translation units will be returned in one round-trip.
Remarks
  • A FilterExpression can be set on the iterator in which case only those TUs which satisfy the filter condition will be returned.
  • See also the remarks on MaxScan on how to avoid timeouts with filtered iteration.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPreviewEditTranslationUnitsWithIterator
Applies the specified edit script to the translation units in a TM, but unlike EditTranslationUnitsWithIterator(EditScript, EditUpdateMode, RegularIterator), the TUs will not be updated in the TM, but modified copies of the TUs will be returned to the caller. This can be used to "preview" the changes the edit script would apply.
Public methodReindexTranslationUnits
Re-indexes the translation memory, using an iterator so that the client can update progress indicators or discontinue the process.

The same iterator instance should be passed in subsequent calls, in order to obtain the next page, and so on.

Public methodSearchSegment
Performs a segment search.
Public methodSearchSegments
Performs a search for an array of segments.
Public methodSearchSegmentsMasked
Performs a search for an array of segments, specifying a mask which specifies which segments should actually be searched (only those for which the corresponding mask bit is true are searched). If the mask is null, the method behaves identically to SearchSegments(SearchSettings, Segment). Passing a mask only makes sense in document search contexts (IsDocumentSearch set to true).
Public methodSearchText
Performs a text search.
Public methodSearchTranslationUnit
Performs a translation unit search.
Public methodSearchTranslationUnits
Performs a translation unit search for an array of translation units.
Public methodSearchTranslationUnitsMasked
Similar to SearchTranslationUnits(SearchSettings, TranslationUnit), but allows passing a mask which specifies which TUs are actually searched. This is useful in document search contexts where some TUs are passed which should be used to establish a (text) context, but which should not be processed.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdateCachedTranslationUnitCount
Updates the cached translation unit count. Normally, the translation unit count is updated automatically every night. Only use this method to ensure the translation unit count reported by CachedTranslationUnitCount after adding a large amount of translation units. There is no need to call this method after an import using a TranslationMemoryImporter or a ScheduledTranslationMemoryImportOperation; these classes automatically update the cached translation unit count.
Public methodUpdateTranslationUnit
Updates the properties and fields of an existing translation unit if the source and target segments are unchanged or adds a new translation unit otherwise. If the provider doesn't support adding/updating, the implementation should return a reasonable ImportResult but should not throw an exception.

The translation unit should be initialized in a previous call to the translation memory, so that the ID property is set to a valid value.

Public methodUpdateTranslationUnits
Updates the properties and fields of an array of existing translation units if the source and target segments are unchanged or adds new translation units otherwise. If the provider doesn't support adding/updating, the implementation should return a reasonable ImportResult but should not throw an exception.

The translation units should be initialized in previous calls to the translation memory, so that their ID properties are set to valid values.

Public methodUpdateTranslationUnitsMasked
Updates (adds, overwrites, or merges) the specified translation units.
Top
See Also
Community
Edit

Be the first to Edit the community content of this topic.
Comments