Skip to main content

.net class to find pc regional settings

  • March 14, 2013
  • 2 replies
  • 0 views

hi all,

is there any .net cobol code out there that will show me how to get the pc's regional / language settings that my application is running on?

many thanks

neil.

2 replies

hi all,

is there any .net cobol code out there that will show me how to get the pc's regional / language settings that my application is running on?

many thanks

neil.

Hi Neil,

I think the CultureInfo class should get what you want. you can access it using code such as:-

     $set ilusing"System.Globalization"

      program-id. Program1 as "CurrentCulture.Program1".

      data division.

      working-storage section.

      01  Cult        type CultureInfo.

      procedure division.

          set Cult to type CultureInfo::CurrentCulture

          display Cult::EnglishName

          display Cult::DateTimeFormat::FullDateTimePattern

          goback.

      end program Program1.

Regards

David


hi all,

is there any .net cobol code out there that will show me how to get the pc's regional / language settings that my application is running on?

many thanks

neil.

Thanks David that works great, much appreciated.