Ignore:
Timestamp:
Jan 25, 2015, 9:54:33 PM (10 years ago)
Author:
chronos
Message:
  • Added: Option to choose interface language.
  • Added: Source of used packages.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormPreferences.pas

    r9 r10  
    1616    ButtonCancel: TButton;
    1717    CheckBoxRememberDatabase: TCheckBox;
     18    ComboBoxLanguage: TComboBox;
     19    Label1: TLabel;
    1820  private
    1921    { private declarations }
     
    3032{$R *.lfm}
    3133
     34uses
     35  UCore, ULanguages;
     36
    3237{ TFormPreferences }
    3338
     
    3540begin
    3641  CheckBoxRememberDatabase.Checked := Preferences.RememberDatabase;
     42  Core.CoolTranslator1.LanguageListToStrings(ComboBoxLanguage.Items);
     43  ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.CoolTranslator1.Language);
     44  if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0;
    3745end;
    3846
     
    4048begin
    4149  Preferences.RememberDatabase := CheckBoxRememberDatabase.Checked;
     50  if ComboBoxLanguage.ItemIndex <> -1 then
     51    Core.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
    4252end;
    4353
Note: See TracChangeset for help on using the changeset viewer.