About language settings [suggestion] #1073
Replies: 2 comments
-
|
I'm currently trying things about changing the code related to the Language ComboBox. Using less hard-coded strings. In this process, the language setting (format) is changed, from a string to a language code, like This also means
|
Beta Was this translation helpful? Give feedback.
-
|
Sounds good, the implementation of language switching has been kind of jank, including but not limited to issues with WPF. If dynamic reloading works, that would be quite nice. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
ref: #1074
1) We can investigate what it takes to apply a change in the app language during run-time.
Summary of Setup
Set the Language at Runtime
Use this API to override the app’s language:
This sets the language for the current session. But to apply it, you’ll need to reload the UI.
Reload the UI
You must clear the navigation stack and reload the root page:
This forces the UI to re-evaluate localized strings.
2) Improve
OnLanguageChangedCurrently, the code checks value against ReadSettingAsync but since this is written every time the combo box changes, it does not compare against current app language. We could use
3) Choose preferred app language as default (for new users)
Use
Windows.Globalization.ApplicationLanguages.Languages: This gives you the ranked list of preferred languages from the user's Windows settings.Beta Was this translation helpful? Give feedback.
All reactions