Skip to main content

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โ€‹

  1. Add a stable key and English value to the default resource
  2. Add the same key to every culture resource
  3. Resolve it through StringLocalizer
  4. Refresh affected view-model properties when LanguageChanged fires
  5. 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

Edit this page on GitHub