Regional & language options ...

Post Reply
User avatar
Rimantas
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Regional & language options ...

Post by Rimantas »

Hi !

How to detect from system what settings are for decimal symbol and digit grouping ? Any DLL or registry call ? It's some problem with other programs with that , so I'll be thankfull for any help .

With best regards !
Rimantas U.
User avatar
Rimantas
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: Regional & language options ...

Post by Rimantas »

Rimantas wrote:Hi !

How to detect from system what settings are for decimal symbol and digit grouping ? Any DLL or registry call ? It's some problem with other programs with that , so I'll be thankfull for any help .

With best regards !
Hi , again !

I found solution for that . Sample :

Code: Select all

function read_reg()
local uVar
local aRet := {}
local oReg
#define  HKEY_CURRENT_USER       2147483649
oReg := TReg32():New( HKEY_CURRENT_USER, "Control Panel\International" )
uVar := oReg:Get( "sMonDecimalSep", " " )
if uVar # NIL
   aadd( aRet, uVar )
   uVar := oReg:Get( "sMonThousandSep", " " )
   aadd( aRet, uVar )
endif
oReg:Close()
return( aRet )
Works fine . :)

Regards !
Rimantas U.
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Rimantas,

Thanks for posting your solution.

James
User avatar
Rimantas
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Post by Rimantas »

James Bott wrote:Rimantas,

Thanks for posting your solution.

James
Oh ! I did mistake :shock: ! After some test I found that this is correct :

Code: Select all

function read_reg()
local aRet := {}
local oReg := TReg32():New( 2147483649, "Control Panel\International" )
aadd( aRet, alltrim( oReg:Get( "sDecimal",  " " ) ) )
aadd( aRet, alltrim( oReg:Get( "sThousand", " " ) ) )
oReg:Close()
return( aRet )
It must be sDecimal & sThousand .

Regards !
Rimantas U.
Post Reply