![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | force locale that differs from OS current culture In some scenarios I need to be able run my app in a different culture than the one currently active in the OS. For example my app has to display datetime formats, menu/dialogtexts and common dialogs (such as the save as dialog) in englisch while the current culture of the OS is set to german. What are the best practises to solve such a scenario in WPF? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: force locale that differs from OS current culture Hi, Robert Ludig wrote: > In some scenarios I need to be able run my app in a different culture > than the one currently active in the OS. For example my app has to > display datetime formats, menu/dialogtexts and common dialogs (such as > the save as dialog) in englisch while the current culture of the OS is > set to german. > > What are the best practises to solve such a scenario in WPF? Just like any other .NET application: using System.Threading; using System.Globalization; //... Thread.CurrentThread.CurrentCulture = new CultureInfo( "en-US" ); Thread.CurrentThread.CurrentUICulture = new CultureInfo( "en-US" ); HTH, Laurent -- Laurent Bugnion, GalaSoft Software engineering: http://www.galasoft-LB.ch PhotoAlbum: http://www.galasoft-LB.ch/pictures Support children in Calcutta: http://www.calcutta-espoir.ch |
My System Specs![]() |
| | #3 (permalink) |
| | Re: force locale that differs from OS current culture That does not translate the common dialogs. On 12 Dez., 21:05, Laurent Bugnion <galasoft...@bluewin.ch> wrote: > Hi, > > Robert Ludig wrote: > > In some scenarios I need to be able run my app in a different culture > > than the one currently active in the OS. For example my app has to > > display datetime formats, menu/dialogtexts and common dialogs (such as > > the save as dialog) in englisch while the current culture of the OS is > > set to german. > > > What are the best practises to solve such a scenario in WPF?Just like any other .NET application: > > using System.Threading; > using System.Globalization; > > //... > > Thread.CurrentThread.CurrentCulture = new CultureInfo( "en-US" ); > Thread.CurrentThread.CurrentUICulture = new CultureInfo( "en-US" ); > > HTH, > Laurent > -- > Laurent Bugnion, GalaSoft > Software engineering:http://www.galasoft-LB.ch > PhotoAlbum:http://www.galasoft-LB.ch/pictures > Support children in Calcutta:http://www.calcutta-espoir.ch |
My System Specs![]() |
| | #4 (permalink) |
| | Re: force locale that differs from OS current culture Hi, Robert Ludig wrote: > That does not translate the common dialogs. > > On 12 Dez., 21:05, Laurent Bugnion <galasoft...@bluewin.ch> wrote: >> using System.Threading; >> using System.Globalization; >> >> //... >> >> Thread.CurrentThread.CurrentCulture = new CultureInfo( "en-US" ); >> Thread.CurrentThread.CurrentUICulture = new CultureInfo( "en-US" ); Do you have an example? Greetings, Laurent -- Laurent Bugnion, GalaSoft Software engineering: http://www.galasoft-LB.ch PhotoAlbum: http://www.galasoft-LB.ch/pictures Support children in Calcutta: http://www.calcutta-espoir.ch |
My System Specs![]() |
| | #5 (permalink) |
| | Re: force locale that differs from OS current culture Hello Robert, Common Dialogs are referenced from the OS and so the OS culture is used. You might investigate MUI versions of Windows - I'm not certain, but there might be support to switch to other languages in the case of Common Dialogs. http://www.microsoft.com/globaldev/r...e/muizone.mspx Regards Joubert "Robert Ludig" <schwertfischtrombose@gmx.de> wrote in message news:1165998778.697903.292760@73g2000cwn.googlegroups.com... > That does not translate the common dialogs. > > On 12 Dez., 21:05, Laurent Bugnion <galasoft...@bluewin.ch> wrote: >> Hi, >> >> Robert Ludig wrote: >> > In some scenarios I need to be able run my app in a different culture >> > than the one currently active in the OS. For example my app has to >> > display datetime formats, menu/dialogtexts and common dialogs (such as >> > the save as dialog) in englisch while the current culture of the OS is >> > set to german. >> >> > What are the best practises to solve such a scenario in WPF?Just like >> > any other .NET application: >> >> using System.Threading; >> using System.Globalization; >> >> //... >> >> Thread.CurrentThread.CurrentCulture = new CultureInfo( "en-US" ); >> Thread.CurrentThread.CurrentUICulture = new CultureInfo( "en-US" ); >> >> HTH, >> Laurent >> -- >> Laurent Bugnion, GalaSoft >> Software engineering:http://www.galasoft-LB.ch >> PhotoAlbum:http://www.galasoft-LB.ch/pictures >> Support children in Calcutta:http://www.calcutta-espoir.ch > |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| v2ctp3: Output of less.exe differs when using Parameter() attribut | PowerShell | |||
| Possible Fix: Microsoft Force Feedback 2 Joystick and the self center force disabling | Vista hardware & devices | |||
| Could not find any resources appropriate for the specified culture or the neutral culture | .NET General | |||
| String handling: ordinal or invariant or current-culture? | PowerShell | |||