Localization Service
Overview
ILocalizationService manages the application's UI language. It exposes the available languages and the currently selected one, applies the matching CultureInfo to the UI culture, and persists the choice so it survives a restart — falling back to English when nothing is stored yet, or when the stored id matches no available language.
The translated strings themselves live in .resx resources — RS.resx for the neutral (English) set and RS.ru.resx for Russian — and are read through the generated RS class. The service does not translate anything on its own: it only selects the culture that the resource lookup resolves against. Only the UI culture is affected — CultureInfo.CurrentCulture is left untouched, so number, date and currency formatting do not follow the selected language.
Available Languages
The default LocalizationService ships these two languages:
Id | Display name |
|---|---|
| English (EN) |
| Русский (RU) |
The list is hardcoded in that implementation — there is no DI hook to extend it.
Usage
Read or change the current language through CurrentLanguage.Value:
To react to changes, subscribe to the property. SynchronizedReactiveProperty<T> pushes its current value on subscribe, so use Skip(1) when you only care about subsequent changes:
Registration
The service is part of the core services and its registration takes no configuration callback:
In a design-time environment the registration substitutes NullLocalizationService.Instance instead.
LocalizationService derives from ServiceWithConfigBase<LocalizationServiceConfig>, which gives it the load and save plumbing for its configuration — see What is a Service?.
API
ILocalizationService
Manages the application's current UI language and available language choices.
Property | Type | Description |
|---|---|---|
|
| Gets the active language selected from |
|
| All available languages. |
ILanguageInfo
Describes an application UI language.
Property | Type | Description |
|---|---|---|
|
| Culture id of the language (e.g. |
|
| Human-readable name shown in the UI. |
LanguageInfo
Represents the default ILanguageInfo implementation.
Property | Type | Description |
|---|---|---|
|
| Culture applied when the language is selected; resolved lazily on access. |