StringTableEntry

One key of a StringTable: the English Source it was authored from, an optional Translation, optional per-category Plurals, a translator Note and a translation State.

Properties

Key

(string) { get; set } = string.Empty: The stable identifier, e.g. menu.file or the English source itself.

Source

(string) { get; set } = string.Empty: The English text the key was authored from — also the fallback for a missing translation.

Translation

(string?) { get; set }: The translated text, or null when the entry is untranslated.

Plurals

(Dictionary<PluralCategory, string>) { get; set } = []: Per-category plural variants, keyed by PluralCategory.

Note

(string?) { get; set }: Context shown to translators, never to players.

State

(string) { get; set } = "new": A translation-workflow state such as new, translated or fuzzy.

Public Methods

Resolve

public string Resolve(string locale, decimal? count)

The value this entry contributes for a locale and count: a matching plural variant when one exists, otherwise the translation, otherwise the English source.

Parameters:

  • locale (string): The locale the plural rules are applied for.
  • count (decimal?): The count selecting a plural variant, or null.

Returns: string

  • The raw value.