ghost1372 / HandyControls

Contains some simple and commonly used WPF controls based on HandyControl
https://ghost1372.github.io/
MIT License
1.1k stars 104 forks source link

I found the language not effect #188

Closed sdwdjzhy closed 1 year ago

sdwdjzhy commented 1 year ago

Describe the bug

Test Projects

I found that when using the old project template, the language class library cannot be loaded。

The test projects has two project .they are NET 472, the [TestHandyControls] not working properly the [TestHandyControlsSDKTemplate] working ok

Steps to reproduce the bug

Create project with "WPF Application (.Net framework)" not "WPF Application".

I test .Net framework 4.7.2.

    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class App : Application
    {

        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            ConfigHelper.Instance.SetLang("zh-CN");
        }
    }

 // in MainWindow
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            HandyControl.Controls.MessageBox.Show("adsfasdf");
        }

Expected behavior

i hope to the button's content is "确定" not "Confirm".

Screenshots

image

NuGet package version

HandyControls (Custom version) 3.4.0

IDE

Visual Studio 2022

Framework type

.Net Framework 4.7.2

Windows version

May 2021 Update (19043)

Additional context

No response

ghost1372 commented 1 year ago

You should install language pack https://www.nuget.org/packages/HandyControls.Lang.zh-cn

sdwdjzhy commented 1 year ago

image

it is.

I use the latest version of HandyControls