? FWNumFormat(nPrice,"E") give me an array
is there a function to set number od price in Italian language
instead of transform(nPrice,"@E €999,999.99")
Function Euro(nValore, nLen, nDec, lVirgola)
local n, cEuro
default nLen := 0, ;
nDec := 2, ;
lVirgola:= .T.
if valtype(nValore) == "C"
n := val(nValore)
else
n := nValore
endif
if lVirgola
cEuro := transform(n, "@E 999,999,999,999" + ; //R
iif(nDec > 0, "." + replicate("9", nDec), ""))
else
cEuro := str(n, max(nLen, 15), nDec)
endif
cEuro := ltrim(cEuro)
if nLen > 0
n := nLen - 1
if len(cEuro) > n
cEuro := replicate("*", n)
else
cEuro := padl(cEuro, n)
endif
endif
Return("€" + cEuro)
function temptest()
local cPic1, cPic2
local nVal := 1234567.89
FWNumFormat( "E", .t. )
cPic1 := NUMPICT( 10, 2 )
cPic2 := NUMPICT( 10, 2, nil, nil, nil, .t. )
XBROWSER { { cPic1, nVal, cPic2, nVal } } TITLE "EUROPEN" SETUP ( ;
oBrw:cEditPictures := { nil, cPic1, nil, cPic2 }, ;
oBrw:cHeaders := { "PIC1", "VAL1", "PIC2", "VAL2" } )
FWNumFormat( "B", .t. )
cPic1 := NUMPICT( 10, 2 )
cPic2 := NUMPICT( 10, 2, nil, nil, nil, .t. )
XBROWSER { { cPic1, nVal, cPic2, nVal } } TITLE "BRITISH" SETUP ( ;
oBrw:cEditPictures := { nil, cPic1, nil, cPic2 }, ;
oBrw:cHeaders := { "PIC1", "VAL1", "PIC2", "VAL2" } )
FWNumFormat( "A", .t. )
cPic1 := NUMPICT( 10, 2 )
cPic2 := NUMPICT( 10, 2, nil, nil, nil, .t. )
XBROWSER { { cPic1, nVal, cPic2, nVal } } TITLE "AMERICAN" SETUP ( ;
oBrw:cEditPictures := { nil, cPic1, nil, cPic2 }, ;
oBrw:cHeaders := { "PIC1", "VAL1", "PIC2", "VAL2" } )
FWNumFormat( "I", .t. )
cPic1 := NUMPICT( 10, 2 )
cPic2 := NUMPICT( 10, 2, nil, nil, nil, .t. )
XBROWSER { { cPic1, nVal, cPic2, nVal } } TITLE "INDIAN" SETUP ( ;
oBrw:cEditPictures := { nil, cPic1, nil, cPic2 }, ;
oBrw:cHeaders := { "PIC1", "VAL1", "PIC2", "VAL2" } )
FWNumFormat( "A", .t., nil, HB_UTF8CHR( 0x20b1 ) )
cPic1 := NUMPICT( 10, 2 )
cPic2 := NUMPICT( 10, 2, nil, nil, nil, .t. )
XBROWSER { { cPic1, nVal, cPic2, nVal } } TITLE "PHILIPPINES" SETUP ( ;
oBrw:cEditPictures := { nil, cPic1, nil, cPic2 }, ;
oBrw:cHeaders := { "PIC1", "VAL1", "PIC2", "VAL2" } )
FWNumFormat( "A", .t., nil, HB_UTF8CHR( 0x0E3F ) )
cPic1 := NUMPICT( 10, 2 )
cPic2 := NUMPICT( 10, 2, nil, nil, nil, .t. )
XBROWSER { { cPic1, nVal, cPic2, nVal } } TITLE "THAILAND" SETUP ( ;
oBrw:cEditPictures := { nil, cPic1, nil, cPic2 }, ;
oBrw:cHeaders := { "PIC1", "VAL1", "PIC2", "VAL2" } )
return nil
nageswaragunupudi wrote:XBrowse, TDatarow etc programs automatically use FWNumFormt() settings to format numeric values.
By simply changing the settings of FWNumFormat() you can Internationalize your application as long as you do not interfere with their working by providing your own hard coded picture formats.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 99 guests