
13.12.2010, 19:02
|
 |
Активный
|
|
Регистрация: 22.01.2010
Сообщения: 211
Версия Delphi: 7, 2010
Репутация: 1349
|
|
Цитата:
Сообщение от PaHaNjkee
Сначала Русский язык надо чтобы в комбобоксе при нажатии на English(Default) читалось из файла english.lng
|
Код:
uses
IniFiles;
procedure TForm1.ComboBox1Change(Sender: TObject);
var
Ini: TIniFile;
begin
case ComboBox1.ItemIndex of
0: Ini := TIniFile.Create(ExtractFilePath(Paramstr(0)) + 'russian.lng');
1: Ini := TIniFile.Create(ExtractFilePath(Paramstr(0)) + 'english.lng')
end;
Label1.Caption := Ini.ReadString('Captions', 'Label1', '...');
Label2.Caption := Ini.ReadString('Captions', 'Label2', '...');
Label3.Caption := Ini.ReadString('Captions', 'Label3', '...');
Button1.Caption := Ini.ReadString('Captions', 'Button1', '...');
Ini.Free;
end;
|