0

i am using DevExpress XtraForm and I set a localizable property to true now i have three language English Arabic Franch each one with their resource fileenter image description here

and i add this code to the Program

            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");
        }

all work fine . But I couldn't find a way to localize XtraMessageBox Strings for example

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

thanks in advance.

M.Bouabdallah
  • 530
  • 10
  • 29

1 Answers1

0

You need to manually edit resource files to add required strings and manually obtain them in your code. I suggest you review the How to use localization in C# thread where this is described in detail.

Gosha_Fighten
  • 3,838
  • 1
  • 20
  • 31