Ignore:
Timestamp:
Aug 22, 2016, 9:31:44 AM (8 years ago)
Author:
chronos
Message:
  • Fixed: Dynamically created forms were not translated.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormSettings.pas

    r86 r96  
    2323    procedure ButtonOkClick(Sender: TObject);
    2424    procedure CheckBoxStartOnLogonChange(Sender: TObject);
     25    procedure FormCreate(Sender: TObject);
    2526    procedure FormShow(Sender: TObject);
    2627  private
     
    4041
    4142uses
    42   UFormMain, UCore;
     43  UCore;
    4344
    4445{ TFormSettings }
     
    4647procedure TFormSettings.FormShow(Sender: TObject);
    4748begin
    48   FormMain.CoolTranslator1.LanguageListToStrings(ComboBoxLanguage.Items);
    49   ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(FormMain.CoolTranslator1.Language);
     49  Core.CoolTranslator1.LanguageListToStrings(ComboBoxLanguage.Items);
     50  ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.CoolTranslator1.Language);
    5051  if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0;
    5152end;
     
    5455begin
    5556  if ComboBoxLanguage.ItemIndex <> -1 then
    56     FormMain.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
     57    Core.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
    5758end;
    5859
     
    6061begin
    6162  UpdateInterface;
     63end;
     64
     65procedure TFormSettings.FormCreate(Sender: TObject);
     66begin
     67  Core.CoolTranslator1.TranslateComponentRecursive(Self);
    6268end;
    6369
Note: See TracChangeset for help on using the changeset viewer.