How to Change Application Language at Runtime? #1404
-
I want to change application language at runtime, i can change language when application is startup like this:
For UWP, the following code seems to do this
but for WinUI 3 There are problems if we move this code to a Page, Frame.Navigate is exist but is null also In any case, GetForCurrentView get exception Can anyone help and rewrite this code for WinUI 3? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
To resolve resources in a different language, you need to set the resource context using the new WinAppSdk APIs. You can find a sample here: https://github.com/microsoft/WindowsAppSDK-Samples/blob/main/Samples/ResourceManagement/cs-winui/winui_desktop_packaged_app/MainWindow.xaml.cs |
Beta Was this translation helpful? Give feedback.
To resolve resources in a different language, you need to set the resource context using the new WinAppSdk APIs. You can find a sample here: https://github.com/microsoft/WindowsAppSDK-Samples/blob/main/Samples/ResourceManagement/cs-winui/winui_desktop_packaged_app/MainWindow.xaml.cs