Class Localization

Namespace
Forma.Xaml
Assembly
Forma.dll

The data-i18n convention (as i18next's DOM bindings use): controls authored with data-i18n="menu.play" carry the key as the data attribute i18n; Apply(Control, Func<string, string>) sets their text from a translation function, and is called again when the language changes. data-i18n-placeholder, data-i18n-label and data-i18n-title localize the placeholder, the accessibility label and the title the same way.

public static class Localization
Inheritance
Localization
Inherited Members

Methods

Apply(Control, Func<string, string>)

Replaces the text of every control under root that carries a localization key, using translate.

public static void Apply(Control root, Func<string, string> translate)

Parameters

root Control
translate Func<string, string>