C# 如何本地化XtraMessageBox字符串
我使用的是DevExpress XtraForm,我将本地化属性设置为true,现在我有三种语言:英语、阿拉伯语、法语,每种语言都有自己的资源文件 我把这些代码添加到程序中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-
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);
提前感谢。您需要手动编辑资源文件以添加所需字符串,并在代码中手动获取它们。我建议您查看详细描述的线程