Class TMXTools
Inherited Members
Namespace: SdlSdl.LanguagePlatformIOTMX
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 |
---|---|
TaskLanguagePairSystem.ValueTuple{Sdl.LanguagePlatform.Core.LanguagePair,Sdl.Core.Globalization.CultureCode}.resultCultureCodeSystem.ValueTuple{Sdl.LanguagePlatform.Core.LanguagePair,Sdl.Core.Globalization.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 |
---|---|
TaskIListCultureCodeSystem.ValueTuple{System.Collections.Generic.IList{Sdl.Core.Globalization.CultureCode},System.Int32}.resultintSystem.ValueTuple{System.Collections.Generic.IList{Sdl.Core.Globalization.CultureCode},System.Int32}.scannedTUs | languages |