Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Localizing MessageBox strings

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Globalizer Support
View previous topic :: View next topic  
Author Message
rocco76



Joined: 28 Mar 2007
Posts: 11

PostPosted: Fri Sep 28, 2007 11:04 am    Post subject: Localizing MessageBox strings Reply with quote

Hi

I'm trying Globalizer but I can't understand how it can help me to localize strings in messagebox in my source code. Thankyou.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Sep 28, 2007 11:56 pm    Post subject: Reply with quote

I assume you mean localizing the text on the buttons (OK, Cancel, Yes, No etc). The text and caption can be localized easily by adding the strings to your Properties.Resources and then passing these to the MessageBox methods.

Since the button text is supplied by the system you don't have direct control over it. The proper way to handle this is to install the .NET Framework Language Pack for the languages you are using. The buttons will then display in the language you have selected as your UICulture.

This solution is not always entirely satisfactory when building a multilingual application because it forces users to download and install an additional package. Generally however if the user is using a language specific operating system this Language pack should be installed by default. An alternative solution, which can be useful in some circumstances, is to use a windows hook to intercept messages sent to the underlying system dialogs and translate the button text on the fly. We have some code that does this and will publish a Code Project article soon on the technique. You may also be interested in our Code Project article on Localizing .NET Enums.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
RattleSoft



Joined: 30 Mar 2007
Posts: 6
Location: Juneau, AK

PostPosted: Mon Oct 15, 2007 11:31 pm    Post subject: Reply with quote

Another option is to make your own messagebox control or use an existing one that can be easily modified. I think there might be one on CodeProject.

This might work the best since you won't need to install the Language Pack.
_________________
Tyler J. McDowall
CEO, RattleSoft
www.RattleSoft.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Globalizer Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group