Table of Contents

Class CompositeLocalizer

Namespace
Icy.Localization
Assembly
IcyUI.dll

Chains localizers: asks each in order, and the first string found wins.

public sealed class CompositeLocalizer : ILocalizer
Inheritance
CompositeLocalizer
Implements
Inherited Members
Extension Methods

Constructors

CompositeLocalizer(params ILocalizer[])

Chains localizers: asks each in order, and the first string found wins.

public CompositeLocalizer(params ILocalizer[] localizers)

Parameters

localizers ILocalizer[]

The localizers, the most important first: mod files before the game's own, a DictionaryLocalizer safety net last.

Properties

Localizers

Gets the localizers, in the order they're asked.

public IReadOnlyList<ILocalizer> Localizers { get; }

Property Value

IReadOnlyList<ILocalizer>

Methods

Localize(string, CultureInfo)

Gets the string for key in culture.

public string? Localize(string key, CultureInfo culture)

Parameters

key string

The key. A key with a context is context + '\u0004' + key, as gettext stores it.

culture CultureInfo

The language to localize into.

Returns

string

The string, or null when this localizer has none: the caller decides what to show. Implementations try culture's parents (ru-RU, then ru) when their source supports it.