Exemplo n.º 1
0
 public Trans(string folder)
 {
     string[] lfiles = Directory.GetFiles(folder, "*.xml");
     CultureInfo info = CultureInfo.CurrentUICulture;
     string deflang = info.TwoLetterISOLanguageName;
     //Console.WriteLine("Default language:" + deflang);
     string lastactive = RegMemory.GetString("lastLanguage", deflang+".xml");
     translations = new SortedList<string, Translation>();
     foreach (string l in lfiles)
     {
         try
         {
             //Console.WriteLine("Adding language " + l);
             FileInfo f = new FileInfo(l);
             string shortname = f.Name;
             Translation t = new Translation(l, shortname);
             if (shortname == "en.xml")
                 english = t;
             if (shortname == lastactive)
                 active = t;
             translations.Add(t.language, t);
         } catch {}
     }
     Trans.trans = this;
 }
Exemplo n.º 2
0
 public void selectLanguage(Translation t)
 {
     active = t;
     RegMemory.SetString("lastLanguage", t.fileshort);
 }
Exemplo n.º 3
0
 public void selectLanguage(Translation t)
 {
     active = t;
     RegMemory.SetString("lastLanguage", t.fileshort);
 }