View previous topic :: View next topic |
Author |
Message |
owaits
Joined: 19 Jul 2011 Posts: 2
|
Posted: Tue Jul 19, 2011 6:53 pm Post subject: Application always starts in invariant |
|
|
I had assumed that when you started the application from the translator edition and selected a language, it would run the application in that language with your translation.
What I am finiding is that the application always starts in the OS language and ignores whatever language you select. Is there something I am missing? |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Jul 20, 2011 12:27 am Post subject: |
|
|
Globalizer changes your windows user account regional settings to the selected culture before starting the application (when Globalizer exits it reset the user culture to the original value). This means that if your application determines its default user interface culture based on the current user culture then it will start in the selected language. For this to happen your application must set the thread CurrentUICulture to the CurrentCulture before opening any windows/forms eg
Code: | Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture; |
If you don't do this then the UICulture will always be invariant. If you are writing a WPF App using Infralution's ResxExtension then instead you need to set the CultureManager.UICulture:
Code: | CultureManager.UICulture = Thread.CurrentThread.CurrentCulture; |
The sample projects illustrate doing this. _________________ Infralution Support |
|
Back to top |
|
|
|