Information générale
Catégorie:
Produits tierce partie
Titre:
How To Localize Data Sources in INTL ?
Hi,all
How To Localize Data Sources
i have used the xdemo.scx for sample:
I add record to String.dbf
cOriginal cFrench
((Data))John ((Data))JohnFrench
and change for use localization the customer.dbf
FORM1.INIT()
*-- This is cheating <s>
_GENMENU="GENMENUX.PRG"
SET PROC TO INTL
nCallType=1
*-- Localize captions and fonts only
IF TYPE("_SCREEN.oINTL") <> "O"
_SCREEN.AddObject("oINTL", "INTL", 1)
************************************************** the new codes
*-- Set Data localization on
*-- Set 2^2 "ON"
_SCREEN.oINTL.SetConfig( BITSET( _SCREEN.oINTL.GetConfig(), 2) )
*-- Get a handle on the font strategy:
oData= _SCREEN.oINTL.GetStrategy("Data")
*-- We want RecordSource (8)
*-- property localized.
oData.SetConfig( 8)
******************************* end new codes
_SCREEN.oINTL.LoadLanguageCollection()
ENDIF
THIS.LangCombo.RowSource= "_SCREEN.oINTl.Languages"
THIS.LangCombo.RowSourceType= 5 && Array
THIS.LangCombo.ReQuery()
THIS.LangCombo.DisplayValue=_SCREEN.oINTl.Languages[1]
IF THIS.DataSession =2
USE STRINGS IN 0 AGAIN SHARED
ENDIF
RETURN
but when i run xdemo again and change this.langCombo to French
Grin1.column1.text1.value = John (don't changes to JohnFrench)
Thanks
Andrey
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement