Changeset 1482


Ignore:
Timestamp:
1/6/2010 9:02:35 AM (5 years ago)
Author:
lowjoel
Message:

Proper suggestion of the default UI language: English if no other language was the current UI language. Also, when checking whether the selected language has changed, check against the CurrentUICulture property of CultureInfo? since that is what we loaded with.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/6.0/Eraser/SettingsPanel.cs

    r1449 r1482  
    195195            if (uiLanguage.SelectedIndex == -1) 
    196196            { 
    197                 defaultsList.Add(S._("User interface language")); 
    198                 foreach (Language lang in uiLanguage.Items) 
    199                     if ((CultureInfo)lang == CultureInfo.CurrentUICulture) 
     197                foreach (Object lang in uiLanguage.Items) 
     198                    if (((Language)lang).Name == "en") 
     199                    { 
    200200                        uiLanguage.SelectedItem = lang; 
     201                        break; 
     202                    } 
    201203            } 
    202204            if (eraseFilesMethod.SelectedIndex == -1) 
     
    407409            } 
    408410 
    409             if (((Language)uiLanguage.SelectedItem).Name != settings.Language) 
     411            if (CultureInfo.CurrentUICulture.Name != ((Language)uiLanguage.SelectedItem).Name) 
    410412            { 
    411413                settings.Language = ((Language)uiLanguage.SelectedItem).Name; 
Note: See TracChangeset for help on using the changeset viewer.