Tlumach
  • Articles
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Tlumach
      • Base
        • ArbParser
        • ArbPlaceholder
        • BaseGenerator
        • BaseJsonParser
        • BaseKeyValueParser
        • BaseParser
        • BaseTableParser
        • BaseXMLParser
        • CsvParser
        • CultureNameMatchEventArgs
        • FileFormats
        • GenericParserException
        • IniParser
        • JsonParser
        • ParserConfigException
        • ParserFileException
        • ParserLoadException
        • Placeholder
        • ResxParser
        • TemplateParserException
        • TemplateProcessingException
        • TextFileParseException
        • TextFormat
        • TextParseException
        • TlumachException
        • TomlParser
        • Translation
        • TranslationConfiguration
        • TranslationEntry
        • TranslationTree
        • TranslationTreeLeaf
        • TranslationTreeNode
        • TsvParser
        • Utils
      • BaseTranslationUnit
      • CultureChangedEventArgs
      • FileContentNeededEventArgs
      • TemplatedTranslationUnit
      • TranslationManager
      • TranslationUnit
      • TranslationValueEventArgs

    Class BaseJsonParser

    The base parser for JSON-formatted configuration and translation files.

    Inheritance
    object
    BaseParser
    BaseJsonParser
    ArbParser
    JsonParser
    Inherited Members
    BaseParser.RecognizeFileRefs
    BaseParser.UseDefaultFileForTranslations
    BaseParser.StringHasParameters(string, TextFormat)
    BaseParser.GetTextProcessingMode()
    BaseParser.LoadTranslationStructure(string, string, out TranslationConfiguration)
    BaseParser.CanHandleExtension(string)
    BaseParser.ParseConfigurationFile(string)
    BaseParser.ParseConfigurationFile(Assembly, string)
    BaseParser.ValidateConfiguration(TranslationConfiguration)
    BaseParser.GetAbsolutePosition(string, int, int)
    BaseParser.DecodeTextProcessingMode(string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Tlumach.Base
    Assembly: Tlumach.Base.dll
    Syntax
    public abstract class BaseJsonParser : BaseParser

    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.

    Declaration
    public static char LocaleSeparatorChar { get; set; }
    Property Value
    Type Description
    char

    Methods

    GetLocaleSeparatorChar()

    Declaration
    public override char GetLocaleSeparatorChar()
    Returns
    Type Description
    char
    Overrides
    BaseParser.GetLocaleSeparatorChar()

    InternalLoadTranslationEntriesFromJSON(JsonElement, Translation?, string)

    Declaration
    protected abstract Translation InternalLoadTranslationEntriesFromJSON(JsonElement jsonObj, Translation? translation, string groupName)
    Parameters
    Type Name Description
    JsonElement jsonObj
    Translation translation
    string groupName
    Returns
    Type Description
    Translation

    InternalLoadTranslationStructure(string)

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

    Declaration
    protected override TranslationTree? InternalLoadTranslationStructure(string content)
    Parameters
    Type Name Description
    string content

    The content to parse.

    Returns
    Type Description
    TranslationTree

    The constructed TranslationTree upon success or null otherwise.

    Overrides
    BaseParser.InternalLoadTranslationStructure(string)
    Exceptions
    Type Condition
    TextParseException

    Gets thrown when parsing of a default translation file fails.

    LoadTranslation(string, CultureInfo?)

    Loads the translation information from the file and returns a translation.

    Declaration
    public override Translation? LoadTranslation(string translationText, CultureInfo? culture)
    Parameters
    Type Name Description
    string translationText

    The text of the file to load.

    CultureInfo culture

    An optional reference to the locale, whose translation is to be loaded. Makes sense for CSV and TSV formats that may contain multiple translations in one file.

    Returns
    Type Description
    Translation

    The loaded translation or null if loading failed.

    Overrides
    BaseParser.LoadTranslation(string, CultureInfo?)

    ParseConfiguration(string, Assembly?)

    Declaration
    public override TranslationConfiguration? ParseConfiguration(string fileContent, Assembly? assembly)
    Parameters
    Type Name Description
    string fileContent
    Assembly assembly
    Returns
    Type Description
    TranslationConfiguration
    Overrides
    BaseParser.ParseConfiguration(string, Assembly?)

    ShouldSkipObjectProperty(string)

    Declaration
    protected virtual bool? ShouldSkipObjectProperty(string key)
    Parameters
    Type Name Description
    string key
    Returns
    Type Description
    bool?

    ShouldSkipStringProperty(string)

    Declaration
    protected virtual bool? ShouldSkipStringProperty(string key)
    Parameters
    Type Name Description
    string key
    Returns
    Type Description
    bool?
    In this article
    Back to top Generated by DocFX