Re: Get Culture Info from Language Name
- From: redaudi@xxxxxxxxx
- Date: 31 Jan 2007 03:41:48 -0800
On Jan 31, 11:29 am, "lucky" <tushar.n.pa...@xxxxxxxxx> wrote:
hi guys,
right now i'm going through System.Globalization Namespace. and i
found very intersting class there called CultureInfo.
i was trying to get cultureInfo on the basis of name but i didnt find
the way to do it. for example, if i pass the language name
"Danish","German",Russian", i'm suppose to get the cultureInfo object
of the language.
can anyone help me out here?
i would appriciate any help.
thanks,
Lucky
Lucky,
My implementation through asp.net works like so;
if (Request.UserLanguages != null)
{
if (Request.UserLanguages.Length > 0)
{
Lang = Request.UserLanguages[0]; // just use the first entry
for now
ci = CultureInfo.CreateSpecificCulture(Lang);
}
else
ci = CultureInfo.CreateSpecificCulture("en-gb");
}
else
ci = CultureInfo.CreateSpecificCulture("en-gb");
Not sure if this is what your after, but hopefully it'll help.
.
- Prev by Date: Re: Unique Identifier
- Next by Date: Re: Process Fails while calling Start
- Previous by thread: IListSource does not contain any data
- Next by thread: Handle the joystick with events (DirectInput and C#)
- Index(es):
Relevant Pages
|
|