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 

Start Application alway run in Default language

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



Joined: 31 Aug 2009
Posts: 3

PostPosted: Mon Aug 31, 2009 3:54 am    Post subject: Start Application alway run in Default language Reply with quote

When I try to test my translation with the "Start Application" button I always get the default language (English) even if I select french or any other language defined. All my paramters have been translated. If I try my application on a French OS by moving my application executable and the floder FR then everything is working properly.

What am I doing wrong?

Regards,

David
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Aug 31, 2009 6:13 am    Post subject: Reply with quote

The Start Application button changes the locale for the current windows user to that specified then starts the application. This is the same as changing your locale from Control Panel (under Regional and Language options) then starting the application. The thread culture of your application is automatically set to the windows user culture by the .NET framework - however the culture of the resources loaded by .NET is determined a seperate Thread.UICulture property.

If you wish to be able to run your application with the French translations on a non-French OS then it is common practice to set the UICulture of your application to match the thread CurrentCulture before any forms are loaded. You do this by adding the line of code:

Code:
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;


In the main() method or in the main form constructor before InitializeComponent is called. The sample projects illustrate this. Once you have done this your application will start with the UI culture determined by the current window culture and the Globalizer.NET Start Application will also be able to work.

The UICulture property is set by the .NET framework by default to match the windows OS culture. That is why when you run your application on a French OS you are seeing the translated resources.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
dbrillon



Joined: 31 Aug 2009
Posts: 3

PostPosted: Mon Aug 31, 2009 12:36 pm    Post subject: Reply with quote

Thanks for the answer.

I thought your product was doing this to help the translator see the results without changing the application or the OS. This was the behavior I was expecting when I select the start application and the language menu. I think this is a little bit misleading for new users.

From the small test I did, except for this behavior that get me puzzle for a while, I really like your product. I will complete my test with a real project and if everything run smoothly we will definitively use this product.

Regards,
David
Back to top
View user's profile Send private message
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