Quick answer: Add LocalizeStringEvent on the Text component. Bind StringChanged → Text.text setter. Auto-refreshes on locale change.
Switching from English to Spanish via dropdown. Strings in code change but on-screen UI stays English. UI was assigned once; no listener for locale changes.
The Fix
UI Text GameObject:
+ LocalizeStringEvent
String Reference: UI/MainMenu/PlayButton
On Updated: Text.text = arg0 // Dynamic String
C# fallback:
LocalizationSettings.SelectedLocaleChanged += locale => RefreshUI();
async Task RefreshUI() {
text.text = await LocalizationSettings.StringDatabase
.GetLocalizedStringAsync("UI", "PlayButton").Task;
}
LocalizeStringEvent is the declarative path. Manual subscription is for code-driven cases (dialog injection, dynamic args).
Verifying
Locale switch button. UI text changes. Without binding: stays in initial locale.
“LocalizeStringEvent. Locale-aware. Updates flow.”
Related Issues
For TMP atlas missing glyph, see atlas glyph. For Canvas Scaler, see Canvas Scaler.
Bind to event. Locale flows.