Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Windows 7 Forum Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

force locale that differs from OS current culture

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 12-12-2006   #1 (permalink)
Robert Ludig
Guest


 

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 SpecsSystem Spec
Old 12-12-2006   #2 (permalink)
Laurent Bugnion
Guest


 

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 SpecsSystem Spec
Old 12-12-2006   #3 (permalink)
Laurent Bugnion
Guest


 

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 SpecsSystem Spec
Old 12-13-2006   #4 (permalink)
Robert Ludig
Guest


 

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 SpecsSystem Spec
Old 12-13-2006   #5 (permalink)
Robert Ludig
Guest


 

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 SpecsSystem Spec
Old 12-13-2006   #6 (permalink)
Laurent Bugnion
Guest


 

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 SpecsSystem Spec
Old 12-13-2006   #7 (permalink)
Laurent Bugnion
Guest


 

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 SpecsSystem Spec
Old 12-13-2006   #8 (permalink)
Joubert Nel
Guest


 

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 SpecsSystem Spec
Old 12-13-2006   #9 (permalink)
Joubert Nel
Guest


 

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 SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not find any resources appropriate for the specified culture or the neutral culture EricW .NET General 3 05-23-2008 12:49 PM
CTP: Culture and Office still a problem Patrick Ogenstad PowerShell 7 11-16-2007 02:53 AM
String handling: ordinal or invariant or current-culture? Andrew Webb PowerShell 0 10-22-2006 06:49 AM
How to force KeyboardNavigation's "current element" ??? Marcus Avalon 0 04-28-2006 12:18 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51