Table of Contents

Class UserInterfaceLanguage

Namespace
RDCore.SDK.Server
Assembly
RDCore.SDK.dll

The language of the platform's user interface, as its configuration says it (Language): the language every message of a component is in, and the one a client tells the servers it starts (RDCore.SDK.Server.ClientLocale).

public static class UserInterfaceLanguage
Inheritance
UserInterfaceLanguage
Inherited Members

Remarks

Only the language of the user interface is set (CurrentUICulture, and the process's default). How numbers and dates are written and read stays with the other regional settings (RegionalSettings), and CurrentCulture is left as it is.

A component applies the setting when it starts (AppHost<TApp>), before it writes anything, and says once what came of it (Message). A server keeps the language it set over the locale its client says (Overrides), so that every component of the platform speaks it whatever its client shows.

Fields

ConfigurationKey

The key of the setting in a component's configuration.

public const string ConfigurationKey = "Configuration:Environment:Regional:Language"

Field Value

string

Properties

NeutralLanguage

The language the platform's own messages are written in, which every language they are not translated in falls back to: en.

public static CultureInfo NeutralLanguage { get; }

Property Value

CultureInfo

Methods

Apply(IConfiguration)

Applies the setting a component's configuration has (ConfigurationKey).

public static UserInterfaceLanguageSetting Apply(IConfiguration configuration)

Parameters

configuration IConfiguration

The component's configuration.

Returns

UserInterfaceLanguageSetting

What the setting came to.

Apply(string?)

Applies the setting: a culture the platform knows becomes the language of the user interface, of the current thread and of every thread that has not set its own.

public static UserInterfaceLanguageSetting Apply(string? setting)

Parameters

setting string

The value of the setting: a culture name, or nothing for the machine's language.

Returns

UserInterfaceLanguageSetting

What the setting came to. The language is left as it is when the setting is empty, or names no culture the platform knows.

IsTranslated(CultureInfo)

Whether the platform's messages are translated in the language of a culture: in the culture itself or in one of its parents (fr for fr-CA). The neutral language (NeutralLanguage) is translated.

public static bool IsTranslated(CultureInfo culture)

Parameters

culture CultureInfo

The culture.

Returns

bool

Resolve(string?)

What the setting comes to, without applying it. The message is in the language the setting names when the platform is translated in it, and otherwise in the current language of the user interface.

public static UserInterfaceLanguageSetting Resolve(string? setting)

Parameters

setting string

The value of the setting: a culture name, or nothing for the machine's language.

Returns

UserInterfaceLanguageSetting