April 25, 2024, 11:01:32 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Locale ID

Started by Brian, May 11, 2017, 09:56:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

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

billhsln

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
When all else fails, get a bigger hammer.

Brian


LarryMc

1033 for me in west Texas
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Egil

1044 here in Norway.

Egil
Support Amateur Radio  -  Have a ham  for dinner!

Brian

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

billhsln

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
When all else fails, get a bigger hammer.