Table of Contents

Class ResxParser

Namespace
Tlumach.Base
Assembly
Tlumach.Base.dll
public class ResxParser : BaseXMLParser
Inheritance
ResxParser
Inherited Members

Properties

LocaleSeparatorChar

Gets or sets the character that is used to separate the locale name from the base name in the names of locale-specific translation files.

public static char LocaleSeparatorChar { get; set; }

Property Value

char

Methods

CanHandleExtension(string)

Checks whether this parser can handle a translation file with the given extension.

This method is not used for configuration files.

public override bool CanHandleExtension(string fileExtension)

Parameters

fileExtension string

The extension to check.

Returns

bool

true if the extension is supported and false otherwise.

GetLocaleSeparatorChar()

Used for internal needs.

public override char GetLocaleSeparatorChar()

Returns

char

The character, used to separate the base file name and the locale.

GetTextProcessingMode()

Used for internal needs.

protected override TextFormat GetTextProcessingMode()

Returns

TextFormat

The effective text processing mode.

InternalLoadTranslationEntriesFromXML(XElement, Translation?, string, TextFormat?)

protected override Translation InternalLoadTranslationEntriesFromXML(XElement parentNode, Translation? translation, string groupName, TextFormat? textProcessingMode)

Parameters

parentNode XElement
translation Translation
groupName string
textProcessingMode TextFormat?

Returns

Translation

InternalLoadTranslationStructure(string, TextFormat?)

Loads the keys from the default translation file and builds a tree of keys.

protected override TranslationTree? InternalLoadTranslationStructure(string content, TextFormat? textProcessingMode)

Parameters

content string

The content to parse.

textProcessingMode TextFormat?

The mode of processing of the text of the default file.

Returns

TranslationTree

The constructed TranslationTree upon success or null otherwise.

Exceptions

TextParseException

Gets thrown when parsing of a default translation file fails.

Use()

Initializes the parser class, making it available for use.

public static void Use()