Table of Contents

Interface ILocalizer

Namespace
Icy.Localization
Assembly
IcyUI.dll

A source of localized strings: localization files, RESX resources, a dictionary filled from code, or any other place a game keeps its translations.

public interface ILocalizer
Extension Methods

Remarks

IcyUI asks the configuration's localizer (Localizer) for every localized string, in the configuration's Culture. Built in: DictionaryLocalizer, ResourceManagerLocalizer, PoLocalizer, and CompositeLocalizer to chain them.

Methods

Localize(string, CultureInfo)

Gets the string for key in culture.

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.