MessageBox "Yes-No" buttons language and bitmap lazarus / 31-LCL ---------------------------------------------------------------------- X-Files · 2011-12-25 00:22 Hello I'm new in Lazarus. 1. How can I change MessageBox( ..., ..., MB_YESNO) buttons caption from english (Yes, No) to my national language? 2. How can I remove bitmaps from these buttons (or how can I use my own bitmaps)? Thx! ---------------------------------------------------------------------- typo · 2011-12-25 01:32 Code: [Select]QuestionDlg('Title','Question?',               mtCustom,  // removes the bitmap              [mrYes,'YesOnYourLanguage',mrNo,'NoOnYourLanguage'],0); ---------------------------------------------------------------------- Bart · 2011-12-25 15:29 The "proper" way is to use the Translations unit to translate all resources strings from lclstrconsts.pas. See  this wiki article. You can add the po-file in question as a Lazarus resource to your program if you want. I have some code for that. Bart ---------------------------------------------------------------------- X-Files · 2011-12-25 22:56 Thx for answers. I want to compile resource file into exe. Bart, if you have some code for that, send me if you can. ---------------------------------------------------------------------- Bart · 2011-12-26 00:59 Take a look at my autotranslation unit. To make the resource you have to use lazres (the sources for lazres come with lazarus). Code: [Select]lazres resourcefilename somepofile.po Then include the created .lrs in the autotranslation unit, instead of my dutch one, and adapt the source to make it use your po-file. Bart ---------------------------------------------------------------------- X-Files · 2011-12-27 12:57 Bart - Like I said, I'm new in Lazarus, so translating is too much complicated for me. So many combinations to display "Ja" and "Nee" (example, I'm not a Dutchman) on buttons? typo - your way is better for me. mtCustom removes nothing, is same as mtInformation. It's OK, no problem. My question is: how I can remove glyphs from buttons or how I can use my own glyphs? ---------------------------------------------------------------------- typo · 2011-12-27 13:47 For me it removes. Lazarus 0.9.31 r33012 FPC 2.5.1 i386-win32-win32/win64 ---------------------------------------------------------------------- Bart · 2011-12-27 17:31 Maybe you better write your own messagebox form. This gives you absolute control over buttons, icons etc. Bart ---------------------------------------------------------------------- X-Files · 2011-12-27 23:18 Bart - you're right, I have to write my own messagebox. typo - for me mtCustom is same like mtInformation. Lazarus 0.9.31 r34358 FPC 2.5.1 i386-win32-win32/win64 Thank you for your answers. ---------------------------------------------------------------------- Shebuka · 2012-01-09 10:29 Quote from: Bart on December 25, 2011, 04:29:12 pmThe "proper" way is to use the Translations unit to translate all resources strings from lclstrconsts.pas. See  this wiki article. You can add the po-file in question as a Lazarus resource to your program if you want. I have some code for that. Bart Hi, is it a known bug that on Carbon it's not working? (At least for MessageBox...) Also, if i understand right i must include in some place all lclstrconsts.%s.pas i use into my MacOS X Application Bundle? Or there is more simple way, like include inside the executable? ---------------------------------------------------------------------- Bart · 2012-01-09 10:43 See my previous post. You can add the languagefiles as a resource to your program. Not sure if this is a real-life solution if you want to support all languages. Also, you cannot update languagefiles without updating the executable in this way. Bart