Localization
Launcher translations belong to Desktop. The default resource is Sources/Hyprism.Desktop/Localization/Resources.resx; each supported culture has a sibling such as Resources.ru-RU.resx
Add a stringโ
- Add a stable key and English value to the default resource
- Add the same key to every culture resource
- Resolve it through
StringLocalizer - Refresh affected view-model properties when
LanguageChangedfires - Run localization tests
Example resource entry
<data name="example.ready" xml:space="preserve">
<value>Ready</value>
</data>
Example access from presentation code
using Hyprism.Desktop.Localization;
var localizer = new StringLocalizer("en-US");
var readyLabel = localizer["example.ready"];
The example key must be added before use. Missing keys fall back to English and then to the key itself
Languages and formattingโ
_supportedCultures in the default resource controls the picker. _langName in each locale is its native display name. IDesktopSettingsStore.Language persists the selected culture
Keep placeholder names and indices aligned between languages. Core publishes data and message keys, while Desktop owns translated UI text and resource lookup
Verifyโ
dotnet test Tests/Hyprism.Desktop.Tests/Hyprism.Desktop.Tests.csproj \
--filter FullyQualifiedName~StringLocalizerTests
Tests check the complete key set and interpolation placeholders. Documentation uses a separate two-language MDX model
Source: Localization