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 Translation

    Contains translation entries that belong to one locale. Each entry is identified by the unique key, which is composed of the key name and the names of all its parent group names joined by dot ".", e.g., "group.subgroup.key". Key names are stored without case conversion but are searched for in a case-insensitive manner.

    Inheritance
    object
    Dictionary<string, TranslationEntry>
    Translation
    Implements
    IDictionary<string, TranslationEntry>
    ICollection<KeyValuePair<string, TranslationEntry>>
    IReadOnlyDictionary<string, TranslationEntry>
    IReadOnlyCollection<KeyValuePair<string, TranslationEntry>>
    IEnumerable<KeyValuePair<string, TranslationEntry>>
    IDictionary
    ICollection
    IEnumerable
    IDeserializationCallback
    ISerializable
    Inherited Members
    Dictionary<string, TranslationEntry>.Add(string, TranslationEntry)
    Dictionary<string, TranslationEntry>.Clear()
    Dictionary<string, TranslationEntry>.ContainsKey(string)
    Dictionary<string, TranslationEntry>.ContainsValue(TranslationEntry)
    Dictionary<string, TranslationEntry>.EnsureCapacity(int)
    Dictionary<string, TranslationEntry>.GetAlternateLookup<TAlternateKey>()
    Dictionary<string, TranslationEntry>.GetEnumerator()
    Dictionary<string, TranslationEntry>.OnDeserialization(object)
    Dictionary<string, TranslationEntry>.Remove(string)
    Dictionary<string, TranslationEntry>.Remove(string, out TranslationEntry)
    Dictionary<string, TranslationEntry>.TrimExcess()
    Dictionary<string, TranslationEntry>.TrimExcess(int)
    Dictionary<string, TranslationEntry>.TryAdd(string, TranslationEntry)
    Dictionary<string, TranslationEntry>.TryGetAlternateLookup<TAlternateKey>(out Dictionary<string, TranslationEntry>.AlternateLookup<TAlternateKey>)
    Dictionary<string, TranslationEntry>.TryGetValue(string, out TranslationEntry)
    Dictionary<string, TranslationEntry>.Comparer
    Dictionary<string, TranslationEntry>.Count
    Dictionary<string, TranslationEntry>.Capacity
    Dictionary<string, TranslationEntry>.this[string]
    Dictionary<string, TranslationEntry>.Keys
    Dictionary<string, TranslationEntry>.Values
    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 class Translation : Dictionary<string, TranslationEntry>, IDictionary<string, TranslationEntry>, ICollection<KeyValuePair<string, TranslationEntry>>, IReadOnlyDictionary<string, TranslationEntry>, IReadOnlyCollection<KeyValuePair<string, TranslationEntry>>, IEnumerable<KeyValuePair<string, TranslationEntry>>, IDictionary, ICollection, IEnumerable, IDeserializationCallback, ISerializable

    Constructors

    Translation(string?, string?)

    Initializes a new instance of the Translation class.

    Declaration
    public Translation(string? locale, string? context = null)
    Parameters
    Type Name Description
    string locale

    An optional locale if one was specified in the translation file.

    string context

    An optional value of the Context property if one was specified in the translation file.

    Properties

    Author

    May contain the value of the @@author key of an ARB file.

    Declaration
    public string? Author { get; set; }
    Property Value
    Type Description
    string

    Context

    Contains the context of the file, from which the translation was loaded, if this context was specified in the file. Contexts are specified in ARB files and are supported and preserved by Tlumach converters.

    Declaration
    public string? Context { get; }
    Property Value
    Type Description
    string

    CustomProperties

    Gets the container that stores custom properties of an ARB file.

    Declaration
    public Dictionary<string, string> CustomProperties { get; }
    Property Value
    Type Description
    Dictionary<string, string>

    IsBasicCulture

    Gets or sets the indicator that the translation belongs to the "basic" culture. Basic cultures are the ones to which neutral cultures resolve. E.g.: "de-DE" is the basic culture for "de-AT" because "de" resolves to specific culture "de-DE".

    Declaration
    public bool IsBasicCulture { get; set; }
    Property Value
    Type Description
    bool

    LastModified

    May contain the value of the @@last_modified key of an ARB file.

    Declaration
    public DateTime? LastModified { get; set; }
    Property Value
    Type Description
    DateTime?

    Locale

    Contains the locale of the file, from which the translation was loaded, if this locale was specified in the file.

    Declaration
    public string? Locale { get; }
    Property Value
    Type Description
    string

    OriginalAssembly

    Optionally contains a reference to the assembly, from which the translation was loaded.

    Declaration
    public Assembly? OriginalAssembly { get; }
    Property Value
    Type Description
    Assembly

    OriginalFile

    Optionally contains the path to the original file, from which the translation was loaded.

    Declaration
    public string? OriginalFile { get; }
    Property Value
    Type Description
    string

    Methods

    SetOrigin(Assembly?, string?)

    Sets the source of the translation.

    Declaration
    public Translation SetOrigin(Assembly? originalAssembly, string? originalFile)
    Parameters
    Type Name Description
    Assembly originalAssembly

    may specify an assembly if the translation was loaded from assembly resources.

    string originalFile

    may specify the file if the translation was loaded from a file (and not obtained via the event).

    Returns
    Type Description
    Translation

    The object, for which the method was called.

    Implements

    IDictionary<TKey, TValue>
    ICollection<T>
    IReadOnlyDictionary<TKey, TValue>
    IReadOnlyCollection<T>
    IEnumerable<T>
    IDictionary
    ICollection
    IEnumerable
    IDeserializationCallback
    ISerializable
    In this article
    Back to top Generated by DocFX