有网友看了上一篇文章《C# 多语言利器 - ResX Manager》后,提出疑问:
This multi-language switch cannot be restarted and cannot be refreshed. Is there any solution?

In fact, there is. A domestic open source god provided a WPF extension library, which includes multi-language switching. Let's see the effect first:

For specific use, please continue to read:
1 Open source library enables dynamic switching between multiple languages
GitHub 地址:点击访问

How to install?
You can search and install directly by NuGet:

2 How to use it?
2.1 Before initialization of the main project
Add resource file references
I18nManager.Instance.Add(LQClass.AdminForWPF.I18nResources.UiResource.ResourceManager);
2.2 Initialization in the Prism module
如果使用Prism实现模块化,也需要在模块构造函数中引用模块的资源文件
I18nManager.Instance.Add(LQClass.ModuleOfLog.I18nResources.UiResource.ResourceManager);
Dynamic language switching
It is more flexible here. When switching languages, save the language identification in the configuration file. Just set the configured language when the program starts. When switching languages dynamically, the same code is used:
var culture = new System.Globalization.CultureInfo(language);
I18nManager.Instance.CurrentUICulture = culture;