Docs · API reference · Verso.Abstractions

StringTable Class#

Reads every string in a resource set for one language, so an extension can hand its translations to something that cannot reach a System.Resources.ResourceManager itself.

public static class StringTable

Inheritance System.Object → StringTable

Remarks#

An isolated layout draws its interface inside a frame, from a script the extension wrote, and that script has no way to ask a .NET resource for a string. The extension can, though: it builds the table on the server for the language the host is answering in and passes it to the frame with the rest of the initial state.

Each key falls back the way a generated Strings property would, through the parent culture to the neutral language, so a string a translator has not reached yet arrives in English rather than going missing.

Methods#

From(ResourceManager, CultureInfo) Method#

Resolves every string the neutral resource set defines, for one language.

public static System.Collections.Generic.IReadOnlyDictionary<string,string> From(System.Resources.ResourceManager manager, System.Globalization.CultureInfo culture);

Parameters#

manager System.Resources.ResourceManager

The resource manager, typically the generated Strings.ResourceManager.

culture System.Globalization.CultureInfo

The language to resolve for, typically UICulture.

Returns#

System.Collections.Generic.IReadOnlyDictionary<System.String,System.String>
Every key with its resolved value.