Steven Black Consulting -- Resources for Visual FoxPro developers and other object-oriented programming professionals

How INTL is Configured

I recommend making a main INTL object named _SCREEN.oINTL. It's possible to have several separate INTL objects co-exist together. Each INTL object is itself an amalgam of other INTL objects called hooks or strategies. Your main INTL object is the master INTL object in your environment, and whichever it happens to be, I assume here that it's called _SCREEN.oINTL .

Use the SetConfig( n) method to configure your main INTL object. You configure INTL with a _SCREEN.oINTL.SetConfig( n) method, where n is a bitwise integer value with the following interpretation:

Value Configuration Meaning

1

2

4

8

16

32

Load the String strategy

Load the Font strategy

Load the Data strategy

Load the Picture strategy

Load the Currency strategy

Load the Right-To-Left display strategy

Configuration integers for the ::SetConfig() method for the various INTL classes.

Example: create an INTL object that localizes strings and fonts

*-- create an INTL object
_SCREEN.AddObject("oINTL", "INTL")
*-- Load the strings and font strategies.
_SCREEN.oINTL.SetConfig(1+ 2)

The operative language and locale of the main INTL object are configured with the SetLanguage() and SetLocale() methods.


How to Configure Strategies

Strategies are bitwise configured. Configuring individual strategies is easy. Simply get a reference to the strategy, then configure it. Here are the configuration meanings for each configurable strategy.

Strategy Value Localization
Data

1 (Default)

2

4

8

16

BoundColumn

ControlSource

RowSource

RecordSource

InputMask

Font

1 (Default)

2 (Default)

Font and FontSize

DynamicFont and
DynamicFontSize

Picture

1 (Default)

2

4 (Default)

8

Picture

DownPicture

Icon

DragIcon

Right to Left 1 All display objects are mirrored
 within their container.
Strings 1 (Default)

2 (Default)

4 (Default)

Caption

ToolTipText

StatusBarText

Configuration integers for the ::SetConfig() method for the various INTL classes.

To get a handle on a loaded strategy, use the ::GetStrategy() method. Thereafter, use the handle's SetConfig() method to configure the strategy.

Example: create an INTL object that localizes strings but not Tooltips. Use the oINTL.GetStrategy() method to get an object reference, then use its SetConfig() method to configure it.

*-- create an INTL object
_SCREEN.AddObject("oINTL", "INTL")
*-- Load the strings and font strategies.
_SCREEN.oINTL.SetConfig(3)
*-- Configure Strings to NOT localize ToolTips
LOCAL loTempHandle
loTempHandle= _SCREEN.oINTL.GetStrategy("String")
*-- For the string strategy, the configuration
*-- for Caption and StatusBarText is 5
loTempHandle.SetConfig( 1 + 4)

Example: create an INTL object that localizes only strings and InputMasks.

*-- create an INTL object
_SCREEN.AddObject("oINTL", "INTL")
*-- Load the strings and data strategies.
_SCREEN.oINTL.SetConfig(5)
*-- now modify the data strategy from its default.
LOCAL oTemp
oTemp= _SCREEN.oINTL.GetStrategy("Data")
*-- Input masks only.
oTemp.SetConfig( 16)