TranslationOptions
Pennington.Localization
In-memory store for UI string translations, keyed by locale and string key. Configured in Translations and consumed by PenningtonStringLocalizer.
Methods
Add
#public void Add(string locale, string key, string value)
Add a single translation entry.
Parameters
localestringkeystringvaluestring
Add
#public void Add(string locale, Dictionary<string, string> entries)
Add multiple translation entries for a locale.
Parameters
localestringentriesDictionary<string, string>
Get
#public string Get(string locale, string key)
Look up a translation by locale and key. Returns null if not found.
Parameters
localestringkeystring
Returns
stringPennington.Localization.TranslationOptions
namespace Pennington.Localization;
/// In-memory store for UI string translations, keyed by locale and string key. Configured in Translations and consumed by PenningtonStringLocalizer.
public class TranslationOptions
{
/// Add a single translation entry.
public void Add(string locale, string key, string value)
;
/// Add multiple translation entries for a locale.
public void Add(string locale, Dictionary<string, string> entries)
;
/// Look up a translation by locale and key. Returns null if not found.
public string Get(string locale, string key)
;
}