Search Results for

    Show / Hide Table of Contents

    Class TMXTools

    Inheritance
    object
    TMXTools
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.IO.TMX
    Assembly: Sdl.LanguagePlatform.IO.dll
    Syntax
    public static class TMXTools

    Methods

    GetLanguageDirection(string)

    Declaration
    [Obsolete("Use GetLanguageDirectionAsync")]
    public static LanguagePair GetLanguageDirection(string filename)
    Parameters
    Type Name Description
    string filename
    Returns
    Type Description
    LanguagePair

    GetLanguageDirectionAsync(string, ICultureMetadataManager)

    Attempts to obtain the language direction from a TMX file which must be bilingual. The method reads the first couple of TUs from the input file and determines the language direction. If not null, the result's languages will be set to the source and target language. If a language in the result is null, it was not present in any TUs in the sample. If a language is the InvariantCulture, it was inconsistent within the sample (as is the case with multi-target-language TUs).

    Declaration
    public static Task<(LanguagePair result, CultureCode headerSourceLanguage)> GetLanguageDirectionAsync(string fileName, ICultureMetadataManager cultureMetadataManager)
    Parameters
    Type Name Description
    string fileName

    The input file name

    ICultureMetadataManager cultureMetadataManager
    Returns
    Type Description
    Task<(LanguagePair result, CultureCode headerSourceLanguage)>

    The language direction or null on errors or if the language direction cannot be determined or invalid input is encountered. No exceptions are returned.

    GetLanguagesAsync(string, int, ICultureMetadataManager)

    Gets the languages from the given TMX filename.

    Declaration
    public static Task<(IList<CultureCode> result, int scannedTUs)> GetLanguagesAsync(string fileName, int limit, ICultureMetadataManager cultureMetadataManager)
    Parameters
    Type Name Description
    string fileName

    file name

    int limit

    limit on scanned TUs; if 0 then no limit

    ICultureMetadataManager cultureMetadataManager
    Returns
    Type Description
    Task<(IList<CultureCode> result, int scannedTUs)>

    languages

    In this article
    • Methods
      • GetLanguageDirection(string)
      • GetLanguageDirectionAsync(string, ICultureMetadataManager)
      • GetLanguagesAsync(string, int, ICultureMetadataManager)
    Back to top Generated by DocFX