Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Par2: Get regional settings 2004-11-12 -- Steve Lewis Look at the Windows API call: GetLocaleInfo. Here is a simple example of its usage:
!api calls related to localization
MODULE('winapi')
GetUserDefaultLCID(),SIGNED,PASCAL
GetLocaleInfoA(SIGNED lcid,SIGNED type, *CSTRING ret,SIGNED szret),SIGNED,PASCAL,RAW
GetCurrencyFormatA(WORD,ULONG,*CSTRING,*CurrencyInfo,*CSTRING,SIGNED),SIGNED,PASCAL,RAW
END
GetLocaleCountry PROCEDURE ! Declare Procedure
LOCALE_SCOUNTRY EQUATE(6) !localized name of country
Locale SIGNED,AUTO
SLen SIGNED,AUTO
iRtn SIGNED,AUTO
lpRtn CSTRING(101),AUTO
CODE
Locale = GetUserDefaultLCID()
lpRtn = ''
SLen = GetLocaleInfoA(Locale, LOCALE_SCOUNTRY, lpRtn, 0)
iRtn = GetLocaleInfoA(Locale, LOCALE_SCOUNTRY, lpRtn, SLen)
RETURN lpRtn
Today is November 23, 2024, 2:17 am This article has been viewed 35243 times.
|
|