Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何本地化XtraMessageBox字符串_C#_Winforms_Devexpress - Fatal编程技术网

C# 如何本地化XtraMessageBox字符串

C# 如何本地化XtraMessageBox字符串,c#,winforms,devexpress,C#,Winforms,Devexpress,我使用的是DevExpress XtraForm,我将本地化属性设置为true,现在我有三种语言:英语、阿拉伯语、法语,每种语言都有自己的资源文件 我把这些代码添加到程序中 if(Properties.Settings.Default.Language== "Français") { System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-

我使用的是DevExpress XtraForm,我将本地化属性设置为true,现在我有三种语言:英语、阿拉伯语、法语,每种语言都有自己的资源文件

我把这些代码添加到程序中

            if(Properties.Settings.Default.Language== "Français")
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-fr");
            System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-fr");
        }
        else if (Properties.Settings.Default.Language == "العربية")
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("ar-ar");
            System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("ar-ar");
        }
        else 
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
            System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
        }
一切正常。 但我找不到本地化XtraMessageBox字符串的方法 比如说

 XtraMessageBox.Show("Remplissez tous les champs, s'il vous plaît ", "Manque de données", MessageBoxButtons.OK, MessageBoxIcon.Warning);

提前感谢。

您需要手动编辑资源文件以添加所需字符串,并在代码中手动获取它们。我建议您查看详细描述的线程