Table of Contents

Class XmlLocalisationInterchangeFileFormatSunamo

Namespace
SunamoDevCode
Assembly
SunamoDevCode.dll

Provides utilities for working with XLIFF (XML Localisation Interchange File Format) files in the Sunamo ecosystem.

public class XmlLocalisationInterchangeFileFormatSunamo
Inheritance
XmlLocalisationInterchangeFileFormatSunamo
Inherited Members
Extension Methods

Fields

Cs

C# const string declaration prefix.

public const string Cs = "const string "

Field Value

string

PathXlfKeys

Path to the XlfKeys.cs constants file.

public static string PathXlfKeys

Field Value

string

RLDataCs

Resource lookup data key for Czech language.

public const string RLDataCs = "RLData.cs["

Field Value

string

RLDataEn

Translate.FromKey(

public const string RLDataEn = "RLData.en["

Field Value

string

RLDataEn2

Alternative resource lookup data key for English language.

public const string RLDataEn2 = "RLDataEn["

Field Value

string

SessI18n

Session i18n lookup prefix string.

public const string SessI18n = "Translate.FromKey("

Field Value

string

SessI18nShort

Short form of session i18n lookup prefix.

public const string SessI18nShort = "Translate.FromKey("

Field Value

string

SunamoStringsDot

Prefix for SunamoStrings class member access.

public static string SunamoStringsDot

Field Value

string

XlfKeysDot

XlfKeys class name with dot separator for key lookup.

public const string XlfKeysDot = "XlfKeys."

Field Value

string

Methods

ConstsFromClipboard(string)

Parses constant definitions from multiline text input.

public static void ConstsFromClipboard(string input)

Parameters

input string

Multiline text containing constant definitions.

GetConstsFromLine(string)

Extracts the constant name from a C# const declaration line.

public static string GetConstsFromLine(string line)

Parameters

line string

Line of C# code containing a const declaration.

Returns

string

The constant name extracted from the line.

GetLangFromFilename(string)

public static LangsDC GetLangFromFilename(string text)

Parameters

text string

Returns

LangsDC

RemoveDuplicatedXlfKeysConsts()

Compare to whole line

public static Task RemoveDuplicatedXlfKeysConsts()

Returns

Task

RemoveDuplicatedXlfKeysConsts2()

Removes duplicated XLF key constants from the XlfKeys source file, keeping only unique entries.

public static Task RemoveDuplicatedXlfKeysConsts2()

Returns

Task

ReplaceHtmlEntitiesWithEmpty(string)

Removes all HTML entity references from the content of the specified XLIFF file.

public static Task ReplaceHtmlEntitiesWithEmpty(string xlfPath)

Parameters

xlfPath string

Path to the XLIFF file to process.

Returns

Task

ReplaceInXlfManuallyEnteredPairsWithPrependXlfKeys(string)

Replaces manually entered key pairs in the XLIFF file by prepending XlfKeys prefix.

public static Task ReplaceInXlfManuallyEnteredPairsWithPrependXlfKeys(string xlfPath)

Parameters

xlfPath string

Path to the XLIFF file to process.

Returns

Task

TextFromRLData(string, string)

Returns the code snippet for getting a localized value from RLData based on the file extension.

public static string? TextFromRLData(string pathOrExt, string key2)

Parameters

pathOrExt string

File path or extension to determine the output format.

key2 string

Localization key to use in the generated code.

Returns

string

Generated code snippet for the appropriate language, or null if not implemented.