Search Results for

    Show / Hide Table of Contents

    Interface ITranslationMemoryLanguageDirection

    Exposes functionality for a specific language direction within a translation memory.

    Inherited Members
    ITranslationProviderLanguageDirection.SearchSegment(SearchSettings, Segment)
    ITranslationProviderLanguageDirection.SearchSegments(SearchSettings, Segment[])
    ITranslationProviderLanguageDirection.SearchSegmentsMasked(SearchSettings, Segment[], Boolean[])
    ITranslationProviderLanguageDirection.SearchText(SearchSettings, String)
    ITranslationProviderLanguageDirection.SearchTranslationUnit(SearchSettings, TranslationUnit)
    ITranslationProviderLanguageDirection.SearchTranslationUnits(SearchSettings, TranslationUnit[])
    ITranslationProviderLanguageDirection.SearchTranslationUnitsMasked(SearchSettings, TranslationUnit[], Boolean[])
    ITranslationProviderLanguageDirection.AddTranslationUnit(TranslationUnit, ImportSettings)
    ITranslationProviderLanguageDirection.AddTranslationUnits(TranslationUnit[], ImportSettings)
    ITranslationProviderLanguageDirection.AddOrUpdateTranslationUnits(TranslationUnit[], Int32[], ImportSettings)
    ITranslationProviderLanguageDirection.AddTranslationUnitsMasked(TranslationUnit[], ImportSettings, Boolean[])
    ITranslationProviderLanguageDirection.AddOrUpdateTranslationUnitsMasked(TranslationUnit[], Int32[], ImportSettings, Boolean[])
    ITranslationProviderLanguageDirection.UpdateTranslationUnit(TranslationUnit)
    ITranslationProviderLanguageDirection.UpdateTranslationUnits(TranslationUnit[])
    ITranslationProviderLanguageDirection.SourceLanguage
    ITranslationProviderLanguageDirection.TargetLanguage
    ITranslationProviderLanguageDirection.CanReverseLanguageDirection
    Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
    Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
    Syntax
    public interface ITranslationMemoryLanguageDirection : ITranslationProviderLanguageDirection

    Properties

    TranslationProvider

    Gets the translation memory to which this language direction belongs.

    Declaration
    ITranslationMemory TranslationProvider { get; }
    Property Value
    Type Description
    ITranslationMemory

    Methods

    ApplyFieldsToTranslationUnit(FieldValues, Boolean, PersistentObjectToken)

    Applies the specified field values to the translation unit identified by the specified translationUnitId.

    Declaration
    bool ApplyFieldsToTranslationUnit(FieldValues values, bool overwrite, PersistentObjectToken translationUnitId)
    Parameters
    Type Name Description
    FieldValues values

    The field values to apply

    System.Boolean overwrite

    If true, overwrite the old values, and merge the new values with the old ones otherwise.

    PersistentObjectToken translationUnitId

    The identifier of the translation unit to apply the field values to

    Returns
    Type Description
    System.Boolean

    true if the translation unit has been modified. false otherwise.

    ApplyFieldsToTranslationUnits(FieldValues, Boolean, PersistentObjectToken[])

    Applies the specified field values to the translation units identified by the specified translationUnitIds collection.

    Declaration
    int ApplyFieldsToTranslationUnits(FieldValues values, bool overwrite, PersistentObjectToken[] translationUnitIds)
    Parameters
    Type Name Description
    FieldValues values

    The field values to apply

    System.Boolean overwrite

    If true, overwrite the old values, and merge the new values with the old ones otherwise.

    PersistentObjectToken[] translationUnitIds

    A collection of translation unit IDs to apply the field values to

    Returns
    Type Description
    System.Int32

    The number of changed translation units

    DeleteAllTranslationUnits()

    Deletes all translation units from the TM.

    Declaration
    int DeleteAllTranslationUnits()
    Returns
    Type Description
    System.Int32

    The number of deleted translation units

    DeleteTranslationUnit(PersistentObjectToken)

    Deletes the translation unit with the specified translationUnitId from the TM.

    Declaration
    bool DeleteTranslationUnit(PersistentObjectToken translationUnitId)
    Parameters
    Type Name Description
    PersistentObjectToken translationUnitId

    The ID of the translation unit to delete.

    Returns
    Type Description
    System.Boolean

    true if the translation unit was deleted, false otherwise.

    DeleteTranslationUnits(PersistentObjectToken[])

    Deletes the translation units with the specified IDs from the translation memory.

    Declaration
    int DeleteTranslationUnits(PersistentObjectToken[] translationUnitIds)
    Parameters
    Type Name Description
    PersistentObjectToken[] translationUnitIds

    A collection of the translation unit IDs to delete

    Returns
    Type Description
    System.Int32

    The number of deleted translation units

    DeleteTranslationUnitsWithIterator(ref RegularIterator)

    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.

    Declaration
    int DeleteTranslationUnitsWithIterator(ref RegularIterator iterator)
    Parameters
    Type Name Description
    RegularIterator iterator

    The iterator to use.

    Returns
    Type Description
    System.Int32

    The number of deleted translation units.

    EditTranslationUnits(EditScript, EditUpdateMode, PersistentObjectToken[])

    Applies an EditScript to the translation units identified by the identifiers in the translationUnitIds collection.

    Declaration
    int EditTranslationUnits(EditScript editScript, EditUpdateMode updateMode, PersistentObjectToken[] translationUnitIds)
    Parameters
    Type Name Description
    EditScript editScript

    The edit script to apply

    EditUpdateMode updateMode

    The update mode, which can be to update changed translation units in-place or add new translation units to the TM (which is only relevant if segment data has been changed).

    PersistentObjectToken[] translationUnitIds

    The collection of TU IDs to apply the edit script to.

    Returns
    Type Description
    System.Int32

    The number of changed or edited translation units

    EditTranslationUnitsWithIterator(EditScript, EditUpdateMode, ref RegularIterator)

    Applies an EditScript to the translation units, using an iterator.

    Declaration
    int EditTranslationUnitsWithIterator(EditScript editScript, EditUpdateMode updateMode, ref RegularIterator iterator)
    Parameters
    Type Name Description
    EditScript editScript

    The edit script to apply

    EditUpdateMode updateMode

    The update mode, which can be to update changed translation units in-place or add new translation units to the TM (which is only relevant if segment data has been changed).

    RegularIterator iterator

    The iterator to use. Note that a filter condition can be set on the iterator in which case the script will only be applied to those translation units which satisfy the filter condition.

    Returns
    Type Description
    System.Int32

    The number of changed or edited translation units

    Remarks

    Note that a filter condition can also be set on the editScript instead of the iterator. Depending on the back-end storage, it may be more efficient to set it on the iterator than on the edit script.

    GetDuplicateTranslationUnits(ref DuplicateIterator)

    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:

    Declaration
    TranslationUnit[] GetDuplicateTranslationUnits(ref DuplicateIterator iterator)
    Parameters
    Type Name Description
    DuplicateIterator iterator

    The iterator to use

    Returns
    Type Description
    TranslationUnit[]

    The translation units which are potential duplicates, or null if no more potential duplicates can be found.

    GetTranslationUnit(PersistentObjectToken)

    Retrieves the translation unit with the specified translationUnitId from the translation memory.

    Declaration
    TranslationUnit GetTranslationUnit(PersistentObjectToken translationUnitId)
    Parameters
    Type Name Description
    PersistentObjectToken translationUnitId

    The ID of the translation unit to retrieve.

    Returns
    Type Description
    TranslationUnit

    The translation unit with the specified ID, or null if that TU does not exist.

    GetTranslationUnitCount()

    Returns the number of translation units in this TM. Note that the computation of the TU count may be a time-consuming operation for some back-end storage systems.

    Declaration
    int GetTranslationUnitCount()
    Returns
    Type Description
    System.Int32

    GetTranslationUnits(ref RegularIterator)

    Retrieves a set of translation units, using an iterator. At most MaxCount translation units will be returned in one round-trip.

    Declaration
    TranslationUnit[] GetTranslationUnits(ref RegularIterator iterator)
    Parameters
    Type Name Description
    RegularIterator iterator

    The iterator

    Returns
    Type Description
    TranslationUnit[]

    The translation units, or null if no more translation units can be retrieved.

    PreviewEditTranslationUnitsWithIterator(EditScript, ref RegularIterator)

    Applies the specified edit script to the translation units in a TM, but unlike EditTranslationUnitsWithIterator(EditScript, EditUpdateMode, ref 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.

    Declaration
    TranslationUnit[] PreviewEditTranslationUnitsWithIterator(EditScript editScript, ref RegularIterator iterator)
    Parameters
    Type Name Description
    EditScript editScript

    The edit script

    RegularIterator iterator

    An iterator. See also the iterator-related remarks for EditTranslationUnitsWithIterator(EditScript, EditUpdateMode, ref RegularIterator).

    Returns
    Type Description
    TranslationUnit[]

    ReindexTranslationUnits(ref RegularIterator)

    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.

    Declaration
    bool ReindexTranslationUnits(ref RegularIterator iterator)
    Parameters
    Type Name Description
    RegularIterator iterator

    The iterator to use for the re-indexing process.

    Returns
    Type Description
    System.Boolean

    False if the iterator is at the end of the TM or the TM is empty, true otherwise. The re-indexing process should be continued until the method returns false.

    Remarks

    For larger TMs (> 100.000 TUs) it is recommended to also recompute the index statistics after the re-indexing finished (see RecomputeFuzzyIndexStatistics()).

    UpdateTranslationUnitsMasked(TranslationUnit[], Boolean[])

    Updates (adds, overwrites, or merges) the specified translation units.

    Declaration
    ImportResult[] UpdateTranslationUnitsMasked(TranslationUnit[] translationUnits, bool[] mask)
    Parameters
    Type Name Description
    TranslationUnit[] translationUnits

    The translation units to update.

    System.Boolean[] mask

    An optional mask with the same length as translationUnits. If provided, only those TUs in translationUnits will be updated for which the corresponding flag in mask is

    true
    . Those TUs for which the corresponding flag is
    false
    will only be used to establish context information. If no masking is required, this parameter can be null.

    Returns
    Type Description
    ImportResult[]

    An array of ImportResults with the same length as translationUnits, which indicates, for each translation unit, the action taken by the translation memory.

    On this page

    • Properties
      • TranslationProvider
    • Methods
      • ApplyFieldsToTranslationUnit(FieldValues, Boolean, PersistentObjectToken)
      • ApplyFieldsToTranslationUnits(FieldValues, Boolean, PersistentObjectToken[])
      • DeleteAllTranslationUnits()
      • DeleteTranslationUnit(PersistentObjectToken)
      • DeleteTranslationUnits(PersistentObjectToken[])
      • DeleteTranslationUnitsWithIterator(ref RegularIterator)
      • EditTranslationUnits(EditScript, EditUpdateMode, PersistentObjectToken[])
      • EditTranslationUnitsWithIterator(EditScript, EditUpdateMode, ref RegularIterator)
      • GetDuplicateTranslationUnits(ref DuplicateIterator)
      • GetTranslationUnit(PersistentObjectToken)
      • GetTranslationUnitCount()
      • GetTranslationUnits(ref RegularIterator)
      • PreviewEditTranslationUnitsWithIterator(EditScript, ref RegularIterator)
      • ReindexTranslationUnits(ref RegularIterator)
      • UpdateTranslationUnitsMasked(TranslationUnit[], Boolean[])
    Back to top Generated by DocFX