Skip to content

fix(i18n): refresh all localized bindings live on language switch#11

Merged
keyldev merged 1 commit into
mainfrom
fix/live-language-switch-nav
Jun 6, 2026
Merged

fix(i18n): refresh all localized bindings live on language switch#11
keyldev merged 1 commit into
mainfrom
fix/live-language-switch-nav

Conversation

@keyldev

@keyldev keyldev commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator
  • SetLanguage raised PropertyChanged("Item[]"), a WPF-ism Avalonia ignores
  • Avalonia's INPC accessor re-reads only on PropertyName=="Item" or empty; string-keyed indexer bindings use the CLR name "Item", not "Item[]"
  • bottom nav / sidebar (persistent controls) stayed stale until restart; pages only looked translated because they rebuild on navigation
  • raise PropertyChanged(string.Empty) — "all changed" — so every binding on Localizer.Instance re-reads instantly

Summary

Fixing issue #8

  • SetLanguage raised PropertyChanged("Item[]"), a WPF-ism Avalonia ignores
  • Avalonia's INPC accessor re-reads only on PropertyName=="Item" or empty; string-keyed indexer bindings use the CLR name "Item", not "Item[]"
  • bottom nav / sidebar (persistent controls) stayed stale until restart; pages only looked translated because they rebuild on navigation
  • raise PropertyChanged(string.Empty) — "all changed" — so every binding on Localizer.Instance re-reads instantly

Related

Type

  • Bug fix
  • Feature
  • Refactor / cleanup
  • Docs / CI
  • Other:

Checklist

  • Builds with 0 warnings (TreatWarningsAsErrors=true).
  • Tests pass (dotnet test); new Core logic has unit tests.
  • No layering violation — App references Core only (Infrastructure / Video / Devices wired via DI in a head).
  • Scope stays within one phase (didn't pull work from a later phase's "Не входит").
  • README / docs updated if public commands, options, or setup changed.

Platforms tested

  • Windows
  • Linux
  • macOS
  • Android
  • iOS
  • CI build only

Screenshots / notes

image image

- SetLanguage raised PropertyChanged("Item[]"), a WPF-ism Avalonia ignores
- Avalonia's INPC accessor re-reads only on PropertyName=="Item" or empty; string-keyed indexer bindings use the CLR name "Item", not "Item[]"
- bottom nav / sidebar (persistent controls) stayed stale until restart; pages only looked translated because they rebuild on navigation
- raise PropertyChanged(string.Empty) — "all changed" — so every binding on Localizer.Instance re-reads instantly
@keyldev keyldev merged commit 23b8e6a into main Jun 6, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant