Table of Contents

Class XlfResourcesH

Namespace
SunamoLang.SunamoXlf
Assembly
SunamoLang.dll

Helper class for XLF (XLIFF) resource loading and processing. In sunamo, XliffParser and fmdev.ResX are not available as they require .NET Framework due to CodeDom.

public class XlfResourcesH
Inheritance
XlfResourcesH
Inherited Members
Extension Methods

Properties

Initialized

Gets or sets whether the XLF resources have been initialized.

public static bool Initialized { get; set; }

Property Value

bool

Methods

GetTransUnits(XlfDocumentLang)

Extracts all translation units from an XLF document into a dictionary.

public static Dictionary<string, string> GetTransUnits(XlfDocumentLang document)

Parameters

document XlfDocumentLang

The XLF document to process.

Returns

Dictionary<string, string>

A dictionary mapping translation IDs to their target values.

PathToXlfSunamo(Langs, string)

Constructs the full path to a Sunamo XLF file based on language and base path.

public static string PathToXlfSunamo(Langs lang, string basePathXlfFile)

Parameters

lang Langs

The language identifier.

basePathXlfFile string

The base path to the XLF file without language suffix.

Returns

string

The full path to the XLF file including language suffix and extension.

SaveResouresToRL(string, LocalizationLanguages)

Saves localization resources to the resource loader.

public static string? SaveResouresToRL(string basePathToSunamoProject, LocalizationLanguages localizationLanguages)

Parameters

basePathToSunamoProject string

The base path to the Sunamo project.

localizationLanguages LocalizationLanguages

The localization languages containing Czech and English content.

Returns

string

The resource key that was processed.

SaveResouresToRL<StorageFolder, StorageFile>(string?, string, LocalizationLanguages)

Saves localization resources to the resource loader with generic type parameters.

public static string? SaveResouresToRL<StorageFolder, StorageFile>(string? key, string basePath, LocalizationLanguages localizationLanguages)

Parameters

key string

The resource key to process.

basePath string

The base path to the project.

localizationLanguages LocalizationLanguages

The localization languages containing Czech and English content.

Returns

string

The resource key that was processed, or null if already processed.

Type Parameters

StorageFolder

The storage folder type (unused, for compatibility).

StorageFile

The storage file type (unused, for compatibility).