1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88:
| procedure TFMain.ChangeLan(const lan: String); var i, j: Integer; c: TObject; begin LanINI := TINIFile.Create(ProgVerz + '\lan.ini');
WITH Application DO begin FOR i := 0 to ComponentCount - 1 DO BEGIN FOR j := 0 TO Components[i].ComponentCount - 1 DO BEGIN c := Components[i].Components[j]; If (c is TLabel) then begin If (c AS TLabel).Tag <> 0 then begin (c AS TLabel).Caption := LanINI.ReadString(lan, IntToStr((c AS TLabel).Tag)+'cap', ''); end; end;
If (c is TPanel) then begin If (c AS TPanel).Tag <> 0 then begin (c AS TPanel).Caption := LanINI.ReadString(lan, IntToStr((c AS TPanel).Tag)+'cap', ''); end; end;
If (c is TXPButton) then begin If (c AS TXPButton).Tag <> 0 then begin (c AS TXPButton).Caption := LanINI.ReadString(lan, IntToStr((c AS TXPButton).Tag)+'cap', ''); (c AS TXPButton).Hint := LanINI.ReadString(lan, IntToStr((c AS TXPButton).Tag)+'hint', ''); end; end;
If (c is TCheckBox) then begin If (c AS TCheckBox).Tag <> 0 then begin (c AS TCheckBox).Caption := LanINI.ReadString(lan, IntToStr((c AS TCheckBox).Tag)+'cap', ''); end; end;
If (c is TMenuItem) then begin If (c AS TMenuItem).Tag <> 0 then begin (c AS TMenuItem).Caption := LanINI.ReadString(lan, IntToStr((c AS TMenuItem).Tag)+'cap', ''); end; end;
If (c is TGroupBox) then begin If (c AS TGroupBox).Tag <> 0 then begin (c AS TGroupBox).Caption := LanINI.ReadString(lan, IntToStr((c AS TGroupBox).Tag)+'cap', ''); end; end;
If (c is TImage) then begin If (c AS TImage).Tag <> 0 then begin (c AS TImage).Hint := LanINI.ReadString(lan, IntToStr((c AS TImage).Tag)+'hint', ''); end; end;
If (c is TRadioGroup) then begin If (c AS TRadioGroup).Tag <> 0 then begin (c AS TRadioGroup).Caption := LanINI.ReadString(lan, IntToStr((c AS TRadioGroup).Tag)+'cap', ''); end; end;
If (c is TTabSheet) then begin If (c AS TTabSheet).Tag <> 0 then begin (c AS TTAbSheet).Caption := LanINI.ReadString(lan, IntToStr((c AS TTabSheet).Tag) + 'cap', ''); end; end;
If (c is TSpeedButton) then begin If (c AS TSpeedButton).Tag <> 0 then begin (c AS TSpeedButton).Caption := LanINI.ReadString(lan, IntToStr((c AS TSpeedButton).Tag)+'cap', ''); (c AS TSpeedButton).Hint := LanINI.ReadString(lan, IntToStr((c AS TSpeedButton).Tag)+'hint', ''); end; end;
If (c is TButton) then begin If (c AS TButton).Tag <> 0 then begin (c AS TButton).Caption := LanINI.ReadString(lan, IntToStr((c AS TButton).Tag)+'cap', ''); (c AS TButton).Hint := LanINI.ReadString(lan, IntToStr((c AS TButton).Tag)+'hint', ''); end; end; If (c is TBitBtn) then begin If (c AS TBitBtn).Tag <> 0 then begin (c AS TBitBtn).Caption := LanINI.ReadString(lan, IntToStr((c AS TBitBtn).Tag)+'cap', ''); (c AS TBitBtn).Hint := LanINI.ReadString(lan, IntToStr((c AS TBitBtn).Tag)+'hint', ''); end; end; END; END; end; end; |