hi guys!
i've got one interesting problem.

one of my utility is generating data machine specific, i mean the data
is generated in the culture that the machine has.
my problem is with the numerical data, especially with double values.
the numeric data fetched from the database and saved on the machine is
in non english culture.
i want data in only english culture but i dont know how to set it.

The application is Windows Desktop Application.

can anyone tell me how can i set culture for my application so that it
can always you english culture(US or UK) for Datetime and numeric data?

Tools
c#.net 2005 (VS.NET 2.0)
ms sql server 2000

thanks,
Lucky

RE: Desktop Application Culture Setting by JayKudecha

JayKudecha
Thu Aug 17 06:48:02 CDT 2006

Hello Lucky,

While fetching the data from your machine, you can set the current culture
of the application specific to english.
e.g.
System.Threading.Thread.CurrentThread.CurrentCulture =
System.Globalization.CultureInfo.GetCultureInfo("de-DE");

One the data retrieval is done, you can set back the current culture of the
application specific to the local culture.
e.g.
System.Threading.Thread.CurrentThread.CurrentCulture =
System.Globalization.CultureInfo.CurrentCulture;

Hope it works for you,

Jay Kudecha.



"Lucky" wrote:

> hi guys!
> i've got one interesting problem.
>
> one of my utility is generating data machine specific, i mean the data
> is generated in the culture that the machine has.
> my problem is with the numerical data, especially with double values.
> the numeric data fetched from the database and saved on the machine is
> in non english culture.
> i want data in only english culture but i dont know how to set it.
>
> The application is Windows Desktop Application.
>
> can anyone tell me how can i set culture for my application so that it
> can always you english culture(US or UK) for Datetime and numeric data?
>
> Tools
> c#.net 2005 (VS.NET 2.0)
> ms sql server 2000
>
> thanks,
> Lucky
>
>

Re: Desktop Application Culture Setting by Lucky

Lucky
Thu Aug 17 07:08:55 CDT 2006

Hi Jay,
thanks for your help. that do solved my problem.

thanks,
Tushar
Jay Kudecha wrote:
> Hello Lucky,
>
> While fetching the data from your machine, you can set the current culture
> of the application specific to english.
> e.g.
> System.Threading.Thread.CurrentThread.CurrentCulture =
> System.Globalization.CultureInfo.GetCultureInfo("de-DE");
>
> One the data retrieval is done, you can set back the current culture of the
> application specific to the local culture.
> e.g.
> System.Threading.Thread.CurrentThread.CurrentCulture =
> System.Globalization.CultureInfo.CurrentCulture;
>
> Hope it works for you,
>
> Jay Kudecha.
>
>
>
> "Lucky" wrote:
>
> > hi guys!
> > i've got one interesting problem.
> >
> > one of my utility is generating data machine specific, i mean the data
> > is generated in the culture that the machine has.
> > my problem is with the numerical data, especially with double values.
> > the numeric data fetched from the database and saved on the machine is
> > in non english culture.
> > i want data in only english culture but i dont know how to set it.
> >
> > The application is Windows Desktop Application.
> >
> > can anyone tell me how can i set culture for my application so that it
> > can always you english culture(US or UK) for Datetime and numeric data?
> >
> > Tools
> > c#.net 2005 (VS.NET 2.0)
> > ms sql server 2000
> >
> > thanks,
> > Lucky
> >
> >


Re: Desktop Application Culture Setting by JayKudecha

JayKudecha
Thu Aug 17 07:19:03 CDT 2006

Hi Lucky,

you are welcome.

"Lucky" wrote:

> Hi Jay,
> thanks for your help. that do solved my problem.
>
> thanks,
> Tushar
> Jay Kudecha wrote:
> > Hello Lucky,
> >
> > While fetching the data from your machine, you can set the current culture
> > of the application specific to english.
> > e.g.
> > System.Threading.Thread.CurrentThread.CurrentCulture =
> > System.Globalization.CultureInfo.GetCultureInfo("de-DE");
> >
> > One the data retrieval is done, you can set back the current culture of the
> > application specific to the local culture.
> > e.g.
> > System.Threading.Thread.CurrentThread.CurrentCulture =
> > System.Globalization.CultureInfo.CurrentCulture;
> >
> > Hope it works for you,
> >
> > Jay Kudecha.
> >
> >
> >
> > "Lucky" wrote:
> >
> > > hi guys!
> > > i've got one interesting problem.
> > >
> > > one of my utility is generating data machine specific, i mean the data
> > > is generated in the culture that the machine has.
> > > my problem is with the numerical data, especially with double values.
> > > the numeric data fetched from the database and saved on the machine is
> > > in non english culture.
> > > i want data in only english culture but i dont know how to set it.
> > >
> > > The application is Windows Desktop Application.
> > >
> > > can anyone tell me how can i set culture for my application so that it
> > > can always you english culture(US or UK) for Datetime and numeric data?
> > >
> > > Tools
> > > c#.net 2005 (VS.NET 2.0)
> > > ms sql server 2000
> > >
> > > thanks,
> > > Lucky
> > >
> > >
>
>