Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5
MessageDialog'ları windows a bağlı kalmadan Türkçe yapmak
#1
Merhaba 
Uzun zamandır kullandığım bir fonksiyonu herkes için paylaşmak istedim. Bu fonksiyon ile windows bölgesel ayarlarına ve diline bağlı kalmadan MessageDialog'ları Türkçe olarak veya revize ederseniz istediğiniz her hangi bir dilde kullanabilirsiniz.

function MessageDlgTranslated(const Msg: string; DlgType: TMsgDlgType; Buttons:
 TMsgDlgButtons; DefaultButton: TMsgDlgBtn; HelpCtx: Longint = 0): TModalResult;
begin
 with CreateMessageDialog(Msg, DlgType, Buttons) do
 try
   Position := poDesktopCenter;
   case DlgType of
     mtWarning: Caption := 'Uyarı';
     mtError: Caption := 'Hata';
     mtInformation: Caption := 'Bilgilendirme';
     mtConfirmation: Caption := 'Onaylama';
   end;
   with FindChildControl('Yes') as TButton do
   begin
     Caption := 'Evet';
     if DefaultButton = mbYes then
       TabOrder := 0;
   end;
   with FindChildControl('No') as TButton do
   begin
     Caption := 'Hayır';
     if DefaultButton = mbNo then
       TabOrder := 0;
   end;
   with FindChildControl('Cancel') as TButton do
   begin
     Caption := 'Vazgeç';
     if DefaultButton = mbCancel then
       TabOrder := 0;
   end;
   with FindChildControl('OK') as TButton do
   begin
     Caption := 'Tamam';
     if DefaultButton = mbOK then
       TabOrder := 0;
   end;
   with FindChildControl('Abort') as TButton do
   begin
     Caption := 'İptal Et';
     if DefaultButton = mbAbort then
       TabOrder := 0;
   end;
   with FindChildControl('Retry') as TButton do
   begin
     Caption := 'Tekrar';
     if DefaultButton = mbRetry then
       TabOrder := 0;
   end;
   with FindChildControl('Ignore') as TButton do
   begin
     Caption := 'Es Geç';
     if DefaultButton = mbIgnore then
       TabOrder := 0;
   end;
   with FindChildControl('Yes to All') as TButton do
   begin
     Caption := 'Tümüne Evet';
     if DefaultButton = mbYesToAll then
       TabOrder := 0;
   end;
   with FindChildControl('No to All') as TButton do
   begin
     Caption := 'Tümüne Hayır';
     if DefaultButton = mbNoToAll then
       TabOrder := 0;
   end;
   with FindChildControl('Help') as TButton do
   begin
     Caption := 'Yardım';
     if DefaultButton = mbHelp then
       TabOrder := 0;
   end;
   Result := ShowModal;
 finally
   Free;
 end;
end;

Kullanımı : 

if MessageDlgTranslated('Kesim işlemi iptal edilecek onaylıyor musunuz?',mtConfirmation,[mbYes, mbNo],mbYes,0) = mrYes then
Cevapla


Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
  Windows XP; Win32 uygulaması geçerli değil! delphi.developer 1 193 24-01-2024, Saat: 22:32
Son Yorum: enigma
  türkçe karakter problemi delphiX14 4 415 27-12-2023, Saat: 10:03
Son Yorum: delphiX14
  Windows API kodu çözümlemesi parlakcuma 1 638 23-09-2023, Saat: 05:29
Son Yorum: parlakcuma
  Windows Hizmet Listesi barissagir 0 201 13-09-2023, Saat: 10:55
Son Yorum: barissagir
  FireDac MS-SQL Türkçe karakter problemi mpirpanlar 3 756 26-07-2023, Saat: 12:30
Son Yorum: delphiman



Konuyu Okuyanlar: 1 Ziyaretçi