Localization at runtime

前端 未结 4 1193
鱼传尺愫
鱼传尺愫 2021-01-05 22:49

I have created Windows Form Program in C#. I have some problems with localization. I have resource files in 3 languages. I want to click each language button and change lang

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-05 23:05

    You will need to reload the controls for it to reflect the New culture values

    ComponentResourceManager resources = new ComponentResourceManager(typeof(Form1));
    

    and then you would have to apply for each control using resources.ApplyResources

    Please have a look here

提交回复
热议问题