IonicWind Software

IWBasic => General Questions => Topic started by: Brian on May 11, 2017, 09:56:48 AM

Title: Locale ID
Post by: Brian on May 11, 2017, 09:56:48 AM
Hello,

Can someone try this code for me, please? If you are using English US it should return 1033; if you are using English UK you should get 2057. Don't want to mess up all my settings! Oh, it's a console app...

Thanks a lot,

Brian
Title: Re: Locale ID
Post by: billhsln on May 11, 2017, 10:03:02 AM
ENDIF's in wrong place.
IF localeID=2057
PRINT "You are using British (United Kingdom)"
PRINT "Locale ID:"+STR$(localeID)
ENDIF
IF localeID=1033
PRINT "You are using British (United States)"
PRINT "Locale ID:"+STR$(localeID)
ENDIF


This worked and displayed US.

Bill
Title: Re: Locale ID
Post by: Brian on May 11, 2017, 11:01:01 AM
Thanks, Bill
Title: Re: Locale ID
Post by: LarryMc on May 11, 2017, 07:59:02 PM
1033 for me in west Texas
Title: Re: Locale ID
Post by: Egil on May 12, 2017, 01:51:23 AM
1044 here in Norway.

Egil
Title: Re: Locale ID
Post by: Brian on May 12, 2017, 03:23:16 AM
Thanks, all,

I will have to study the Locale IDs to set the best format for dates when the program loads up. Most countries either use DMY or MDY, and some countries use both formats

Brian
Title: Re: Locale ID
Post by: billhsln on May 12, 2017, 09:27:34 AM
I have been playing with:

GetDateFormatA(2, 0, &st, "ddMMMyy", gdh, 256)

to get the ShortDate, but this does not come up with anything useful.

Bill