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
PathXlfKeys
Path to the XlfKeys.cs constants file.
public static string PathXlfKeys
Field Value
RLDataCs
Resource lookup data key for Czech language.
public const string RLDataCs = "RLData.cs["
Field Value
RLDataEn
Translate.FromKey(
public const string RLDataEn = "RLData.en["
Field Value
RLDataEn2
Alternative resource lookup data key for English language.
public const string RLDataEn2 = "RLDataEn["
Field Value
SessI18n
Session i18n lookup prefix string.
public const string SessI18n = "Translate.FromKey("
Field Value
SessI18nShort
Short form of session i18n lookup prefix.
public const string SessI18nShort = "Translate.FromKey("
Field Value
SunamoStringsDot
Prefix for SunamoStrings class member access.
public static string SunamoStringsDot
Field Value
XlfKeysDot
XlfKeys class name with dot separator for key lookup.
public const string XlfKeysDot = "XlfKeys."
Field Value
Methods
ConstsFromClipboard(string)
Parses constant definitions from multiline text input.
public static void ConstsFromClipboard(string input)
Parameters
inputstringMultiline text containing constant definitions.
GetConstsFromLine(string)
Extracts the constant name from a C# const declaration line.
public static string GetConstsFromLine(string line)
Parameters
linestringLine 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
textstring
Returns
RemoveDuplicatedXlfKeysConsts()
Compare to whole line
public static Task RemoveDuplicatedXlfKeysConsts()
Returns
RemoveDuplicatedXlfKeysConsts2()
Removes duplicated XLF key constants from the XlfKeys source file, keeping only unique entries.
public static Task RemoveDuplicatedXlfKeysConsts2()
Returns
ReplaceHtmlEntitiesWithEmpty(string)
Removes all HTML entity references from the content of the specified XLIFF file.
public static Task ReplaceHtmlEntitiesWithEmpty(string xlfPath)
Parameters
xlfPathstringPath to the XLIFF file to process.
Returns
ReplaceInXlfManuallyEnteredPairsWithPrependXlfKeys(string)
Replaces manually entered key pairs in the XLIFF file by prepending XlfKeys prefix.
public static Task ReplaceInXlfManuallyEnteredPairsWithPrependXlfKeys(string xlfPath)
Parameters
xlfPathstringPath to the XLIFF file to process.
Returns
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
pathOrExtstringFile path or extension to determine the output format.
key2stringLocalization key to use in the generated code.
Returns
- string
Generated code snippet for the appropriate language, or null if not implemented.