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
Methods
GetTransUnits(XlfDocumentLang)
Extracts all translation units from an XLF document into a dictionary.
public static Dictionary<string, string> GetTransUnits(XlfDocumentLang document)
Parameters
documentXlfDocumentLangThe 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
langLangsThe language identifier.
basePathXlfFilestringThe 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
basePathToSunamoProjectstringThe base path to the Sunamo project.
localizationLanguagesLocalizationLanguagesThe 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
keystringThe resource key to process.
basePathstringThe base path to the project.
localizationLanguagesLocalizationLanguagesThe localization languages containing Czech and English content.
Returns
- string
The resource key that was processed, or null if already processed.
Type Parameters
StorageFolderThe storage folder type (unused, for compatibility).
StorageFileThe storage file type (unused, for compatibility).