문제

I need to be able to get/set current location in Win 7 (Control Panel -> Regional and Language -> Location):

Win7: Control Panel - loading= Regional and Language -> Location">

RegionInfo.CurrentRegion doesn't work (can I use it in wrng way??)

The same with CultureInfo.

Any ideas?

도움이 되었습니까?

해결책

Ok you need to change windows register HKEY_CURRENT_USER\Control Panel\International\Geo and there you need change 'Nation'

다른 팁

The data is stored in the registry. You need to overwrite these keys.

To know where it's stored in the registry reead this article: http://www.windowsitpro.com/article/registry2/jsi-tip-0311-regional-settings-in-the-registry-

You can use this code

CultureInfo _CultureInfo = new CultureInfo("ru-RU");                
            Application.CurrentInputLanguage = InputLanguage.FromCulture(_CultureInfo);
            Application.CurrentCulture = _CultureInfo;

Try this: System.Globalization.CultureInfo myCulture = new System.Globalization.CultureInfo("es-ES");

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top