Get current Location (Regional and Language Options)

  • Thread starter Thread starter Freddy Coal
  • Start date Start date
F

Freddy Coal

Hi, I need a little help; I would like know the current Location of the
operating system, the data under Control Panel -> Regional and Len... ->
Location

How I can get that data?. in the moment I read the standars and formats
with:

System.Globalization.CultureInfo.CurrentUICulture, but I can't get the
location.

I search in Google, but I can't find the answer to my question.

Thanks in advance for any help.

Freddy Coal
 
Hi, I need a little help; I would like know the current Location of the
operating system, the data under Control Panel -> Regional and Len... ->
Location

How I can get that data?. in the moment I read the standars and formats
with:

System.Globalization.CultureInfo.CurrentUICulture, but I can't get the
location.

I search in Google, but I can't find the answer to my question.

Thanks in advance for any help.

Freddy Coal

Hi Freddy,

Though not being %100 sure, RegionInfo object outputs correct country
name:

System.Globalization.RegionInfo.CurrentRegion.NativeName

HTH,

Onur Güzel
 
Onur, thanks for your answer. Now I have another question, I would like
change the language of the menus of my Form, I use Localization for that.

You now how change the CurrentUICulture for the user Culture and the Culture
property (format of numbers, dates... etc) for "en-US"?

I need change the culture for change the labels of the form, but I need
numbers and other data with the "en-US" format.

Thanks in advance for any idea.

F.C.

Hi, I need a little help; I would like know the current Location of the
operating system, the data under Control Panel -> Regional and Len... ->
Location

How I can get that data?. in the moment I read the standars and formats
with:

System.Globalization.CultureInfo.CurrentUICulture, but I can't get the
location.

I search in Google, but I can't find the answer to my question.

Thanks in advance for any help.

Freddy Coal

Hi Freddy,

Though not being %100 sure, RegionInfo object outputs correct country
name:

System.Globalization.RegionInfo.CurrentRegion.NativeName

HTH,

Onur Güzel
 
Onur, thanks for your answer. Now I have another question, I would like
change the language of the menus of my Form, I use Localization for that.

You now how change the CurrentUICulture for the user Culture and the Culture
property (format of numbers, dates... etc) for "en-US"?

I need change the culture for change the labels of the form, but I need
numbers and other data with the "en-US" format.

Thanks in advance for any idea.

F.C.









Hi Freddy,

Though not being %100 sure, RegionInfo object outputs correct country
name:

System.Globalization.RegionInfo.CurrentRegion.NativeName

HTH,

Onur Güzel

Well, the simplest method for changing UI culture to "en-US" can be:

My.Application.ChangeUICulture("en-US")

http://msdn.microsoft.com/en-us/library/6bb3xczh.aspx

Remember that, before changing ui culture, you must have Localizable
property to True at design time then, select Language property to
English (United States) to let Visual Studio generate proper .resx
file for you. (See solution by clicking show all files).

Hope this helps,

Onur Güzel
 
Back
Top