This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

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

locale string
key string
value string

Add

#
public void Add(string locale, Dictionary<string, string> entries)

Add multiple translation entries for a locale.

Parameters

locale string
entries Dictionary<string, string>

Get

#
public string Get(string locale, string key)

Look up a translation by locale and key. Returns null if not found.

Parameters

locale string
key string

Returns

string

Pennington.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)
; }