unit ch_languageform;
{$mode delphi}
{$codepage UTF8}
interface
uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, windows;
type
  { TCh_language }
  TCh_language = class(TForm)
    OkBtn: TButton;
    LanguageBox: TListBox;
    procedure FormShow(Sender: TObject);
    procedure OkBtnClick(Sender: TObject);
  private
  public
  procedure UpdateLanguageList;
  end;
var
  Ch_language: TCh_language;
implementation
{$R *.lfm}
uses kernel;
procedure TCh_language.FormShow(Sender: TObject);
begin
//UpdateLanguageList;
end;
procedure TCh_language.OkBtnClick(Sender: TObject);
//var INI: TIniFile;
begin
//if LanguageBox.ItemIndex > -1 then
 //begin
 //INI:= TIniFile.Create(GetCDEPath + 'settings.ini');
 //INI.WriteString('general', 'language', LanguageBox.Items.Strings[LanguageBox.ItemIndex]);
 //INI.Free;
 //UpdateLanguage;
 //ModalResult:= mrOK;
 //end
 //else
 //ShowMessageBox(GetLocalStrA(11), MB_ICONERROR);
end;
procedure TCh_language.UpdateLanguageList;
//var SearchRec: TSearchRec;
    //i: integer;
    //s: string;
begin
//LanguageBox.Items.Clear;
//if FindFirst(GetCDEPath + 'language\*.lng', faAnyFile, SearchRec) = 0 then
 //repeat
  //s:= ChangeFileExt(SearchRec.Name, '');
  //i:= LanguageBox.Items.Add(ChangeFileExt(SearchRec.Name, ''));
  //if (s = GetLanguage) then
   //LanguageBox.ItemIndex:= i;
 //until FindNext(SearchRec) <> 0;
//FindClose(SearchRec.FindHandle);
end;
end.
