Changeset 226 for trunk/Components/ACLMessageForm.pas
- Timestamp:
- Sep 9, 2007, 1:58:38 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Components/ACLMessageForm.pas
r15 r226 40 40 End; 41 41 42 43 44 42 45 Implementation 43 46 … … 58 61 NoButtonCaption: string; 59 62 60 Procedure OnLanguageEvent( Language: TLanguageFile; 61 const Apply: boolean ); 63 Procedure OnLanguageEvent(Language: TLanguageFile; const Apply: boolean); 64 var 65 tmpPrefix : String; 62 66 begin 63 if Language <> nil then 64 Language.Prefix := 'MessageForm.'; // use messageform captions 65 66 LoadString( Language,Apply, OKButtonCaption, 'OKButtonCaption', '~OK' ); 67 LoadString( Language,Apply, CancelButtonCaption, 'CancelButtonCaption', '~Cancel' ); 68 LoadString( Language,Apply, HelpButtonCaption, 'HelpButtonCaption', '~Help' ); 69 LoadString( Language,Apply, YesButtonCaption, 'YesButtonCaption', '~Yes' ); 70 LoadString( Language,Apply, NoButtonCaption, 'NoButtonCaption', '~No' ); 67 tmpPrefix := ''; 68 if Language = nil then 69 begin 70 OKButtonCaption := '~OK'; 71 CancelButtonCaption := '~Cancel'; 72 HelpButtonCaption := '~Help'; 73 YesButtonCaption := '~Yes'; 74 NoButtonCaption := '~No'; 75 end 76 else 77 begin 78 tmpPrefix := 'MessageForm' + LANGUAGE_LABEL_DELIMITER; // use messageform captions 79 80 Language.LL(Apply, OKButtonCaption, tmpPrefix + 'OKButtonCaption', '~OK'); 81 Language.LL(Apply, CancelButtonCaption, tmpPrefix + 'CancelButtonCaption', '~Cancel'); 82 Language.LL(Apply, HelpButtonCaption, tmpPrefix + 'HelpButtonCaption', '~Help'); 83 Language.LL(Apply, YesButtonCaption, tmpPrefix + 'YesButtonCaption', '~Yes'); 84 Language.LL(Apply, NoButtonCaption, tmpPrefix + 'NoButtonCaption', '~No'); 85 end; 71 86 end; 72 87 … … 223 238 224 239 Initialization 225 RegisterClasses ([ TButton, TImage, 226 TMessageForm, TCustomMemo, TListBox]); 240 RegisterClasses ([TButton, TImage, TMessageForm, TCustomMemo, TListBox]); 227 241 228 242 RegisterProcForLanguages( OnLanguageEvent );
Note:
See TracChangeset
for help on using the changeset viewer.