How to show the message box (.net 2.0) in culture specific? : DOTNET
This is a discussion on How to show the message box (.net 2.0) in culture specific? within the DOTNET forums in Framework and Interface Programming category; Hi, Here are the things we have already tested. Installed WinXP MUI pack also, but still showing the text in English only. Could you please help me in this regards to get the text of MessageBox in other locale. Regards Gangadhar Kotu...
| DOTNET Discussion forums related to Microsoft Dot net technologies, CSharp and other related items |
![]() |
| | LinkBack | Thread Tools |
|
#1
| |||
| |||
| Here are the things we have already tested. Installed WinXP MUI pack also, but still showing the text in English only. Could you please help me in this regards to get the text of MessageBox in other locale. Regards Gangadhar Kotu |
|
#2
| |||
| |||
| Hi, To be precise, the button text in the message box should come in culture specific. Regards Gangadhar Kotu On Nov 15, 11:08 am, Gangadhar Kotu <subhash.k...@gmail.com> wrote: > Hi, > > Here are the things we have already tested. > > Installed WinXP MUI pack also, but still showing the text in English > only. > > Could you please help me in this regards to get the text of MessageBox > in other locale. > > Regards > Gangadhar Kotu |
|
#3
| |||
| |||
| On Nov 15, 7:20 am, Gangadhar Kotu <subhash.k...@gmail.com> wrote: > To be precise, the button text in the message box should come in > culture specific. Then you just need to use a ResourceManager and fetch the appropriate text before you call MessageBox.Show. Jon |
|
#4
| |||
| |||
| On Nov 15, 1:50 pm, "Jon Skeet [C# MVP]" <sk...@pobox.com> wrote: > On Nov 15, 7:20 am, Gangadhar Kotu <subhash.k...@gmail.com> wrote: > > > To be precise, the button text in the message box should come in > > culture specific. > > Then you just need to use a ResourceManager and fetch the appropriate > text before you call MessageBox.Show. > > Jon Hi, No. Not the text in the Message Box. But only the OK, Cancel, Yes, No... buttons text to be culture specific........ - Gangadhar Kotu |
|
#5
| |||
| |||
| Gangadhar Kotu <subhash.kotu@gmail.com> wrote: > On Nov 15, 1:50 pm, "Jon Skeet [C# MVP]" <sk...@pobox.com> wrote: > > On Nov 15, 7:20 am, Gangadhar Kotu <subhash.k...@gmail.com> wrote: > > > > > To be precise, the button text in the message box should come in > > > culture specific. > > > > Then you just need to use a ResourceManager and fetch the appropriate > > text before you call MessageBox.Show. > No. Not the text in the Message Box. But only the OK, Cancel, Yes, > No... buttons text to be culture specific........ Ah, I see. Hmm... not sure on that one - a quick test didn't show any change for OK/Cancel when changing the current thread's culture. It could be that changing the culture of Windows will do it though. -- Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet If replying to the group, please do not mail me too |
|
#6
| |||
| |||
| On Nov 17, 1:23 am, Jon Skeet [C# MVP] <sk...@pobox.com> wrote: > Gangadhar Kotu <subhash.k...@gmail.com> wrote: > > On Nov 15, 1:50 pm, "Jon Skeet [C# MVP]" <sk...@pobox.com> wrote: > > > On Nov 15, 7:20 am, Gangadhar Kotu <subhash.k...@gmail.com> wrote: > > > > > To be precise, the button text in the message box should come in > > > > culture specific. > > > > Then you just need to use a ResourceManager and fetch the appropriate > > > text before you callMessageBox.Show. > > No. Not the text in the Message Box. But only the OK, Cancel, Yes, > > No... buttons text to be culture specific........ > > Ah, I see. Hmm... not sure on that one - a quick test didn't show any > change for OK/Cancel when changing the current thread's culture. It > could be that changing the culture of Windows will do it though. > > -- > Jon Skeet - <sk...@pobox.com>http://www.pobox.com/~skeet Blog:http://www.msmvps.com/jon.skeet > If replying to the group, please do not mail me too Hi, For the buttons on the MessageBox, the developer doesn't have access as they enums. MessageBoxButtons.OKCancel MessageBoxButtons.YesNo MessageBoxButtons.YesNoCancel If you see the above enums, you can only specify on the above Enum but not the culture specific.. - Gangadhar Kotu |
|
#7
| |||
| |||
| On Nov 20, 1:48 pm, Gangadhar Kotu <subhash.k...@gmail.com> wrote: > > Ah, I see. Hmm... not sure on that one - a quick test didn't show any > > change for OK/Cancel when changing the current thread's culture. It > > could be that changing the culture of Windows will do it though. > For the buttons on the MessageBox, the developer doesn't have access > as they enums. > > MessageBoxButtons.OKCancel > MessageBoxButtons.YesNo > MessageBoxButtons.YesNoCancel > > If you see the above enums, you can only specify on the above Enum but > not the culture specific.. My point is that if you have Windows in a particular culture, I'd *hope* that the buttons produced by the above enum will be localized. Jon |
|
#8
| |||
| |||
| On Nov 21, 2:42 am, "Jon Skeet [C# MVP]" <sk...@pobox.com> wrote: > > My point is that if you have Windows in a particular culture, I'd > *hope* that the buttons produced by the above enum will be localized. > Setting the thread CurrentUICulture does not change the common dialog language. To change the language used for common dialogs you have to set the "Language used in menus and dialogs" option in the system Regional and Language Options dialog. Unfortunately this also requires logging off and on again before it takes affect. This is a bit of a pain because while you can swap language for most of your .NET application simply by changing the thread CurrentUICulture it can leave your application in a half translated state if you use common dialogs. It is possible to translate the button strings in MessageBoxes (and other common dialogs such as FileOpen, PrintSetup etc) using windows hooks. There are some articles on CodeProject on this topic. Regard Grant Frisken Infralution ..NET Localization Tools www.infralution.com/globalizer.html |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Show toolbar item if field is equals a specific value | usenet | Sharepoint | 0 | 01-08-2007 11:06 AM |
| Launch Oulook Client on a specific message using URL | usenet | Microsoft Exchange | 1 | 03-13-2006 06:53 PM |
| asp show specific record from recordset | usenet | Inetserver | 8 | 10-19-2005 10:53 AM |
| Message to specific user hangs in queue | usenet | Microsoft Exchange | 0 | 11-30-2004 09:31 AM |
| Message to specific user hangs in queue | usenet | Microsoft Exchange | 0 | 11-30-2004 09:30 AM |
All times are GMT -5. The time now is 08:35 AM.


