VPMInt/ProInt (Multilingual) Class

The VPMInt class is a non-visual custom class that contains methods called by code throughout the application where strings and messages are translated. In a VPM Enterprise application the Multilingual object is instantiated from this class and thereafter its properties and methods can be referenced or called using the _SCREEN.oApp.oInt object reference.

Properties

The following table lists the class properties. The properties listed include the standard Visual FoxPro class properties that the VPM Enterprise class uses and the VPM Enterprise custom properties. Where appropriate, the Comments column of the table describes a property and provides suggestions for its use.

Property & Initial Value

Comments

Standard Properties Used:

 

Name = “messaging”

 

Custom Properties:

 

cCurrencyDecimalPoint = “.”

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

cCurrencySeparator = “,”

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

cCurrencySymbol = “$”

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

cDateSeparator = “/”

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

cEnvironmentForm = “environment_int”

Contains the name of the Environment form or form class.

cEnvironmentForm_ClassLibrary = “proint”

Contains the name of the class library that contains the Environment form class if cEnvironmentForm contains the name of a form class.

cInitialCaption_SCREEN = “”

Stores the initial _SCREEN property setting. (See Init event)

cInitialFontName_SCREEN = “”

Stores the initial _SCREEN property setting. (See Init event)

cInitialIcon_SCREEN = “”

Stores the initial _SCREEN property setting. (See Init event)

cInitialPicture_SCREEN = “”

Stores the initial _SCREEN property setting. (See Init event)

cLanguageID = “”

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

cLanguageManagerForm = “language_manager”

Contains the name of the Language Manager form or form class.

cLanguageManagerForm_ ClassLibrary = “proint”

Contains the name of the class library that contains the Language Manager form class if cLanguageManagerForm contains the name of a form class.

cLanaguageSelectionForm = “languageselection”

Contains the name of the Language Selection form or form class.

cLanaguageSelectionForm_ ClassLibrary = “proint”

Contains the name of the class library that contains the Language Selection form class if cLanaguageSelectionForm contains the name of a form class.

cMasterLanguageHelpFile = “”

Holds the name of the master language help file.

cMessageTranslationsForm = “message_translations”

Contains the name of the Message Translations form or form class.

cMessageTranslationsForm_ ClassLibrary = “proint”

Contains the name of the class library that contains the Message Translations form class if cMessageTranslationsForm contains the name of a form class.

cStringLocation = “”

Used internally to pass information to the UpdateStrings method.

cStringManagerForm = “string_manager”

Contains the name of the String Manager form or form class.

cStringManagerForm_ ClassLibrary = “proint”

Contains the name of the class library that contains the String Manager form class if cStringManagerForm contains the name of a form class.

cStringTranslationsForm = “string_translations”

Contains the name of the String Translations form or form class.

cStringTranslationsForm_ ClassLibrary = “proint”

Contains the name of the class library that contains the String Translations form class if cStringTranslationsForm contains the name of a form class.

cTipForm = “tip”

Contains the name of the Tip of the Day form or form class.

cTipForm_ClassLibrary = “proint”

Contains the name of the class library that contains the Tip of the Day form class if cTipForm contains the name of a form class.

cTipManagerForm = “tip_manager”

Contains the name of the Tip Manager form or form class.

cTipManagerForm_ ClassLibrary = “proint”

Contains the name of the class library that contains the Tip Manager form class if cTipManagerForm contains the name of a form class.

cTipTranslationsForm = “tip_translations”

Contains the name of the Tip Translations form or form class.

cTipTranslationsForm_ ClassLibrary = “proint”

Contains the name of the class library that contains the Tip Translations form class if cTipTranslationsForm contains the name of a form class.

cUserLanguageForm = “userlanguage”

Contains the name of the User Language form or form class.

cUserLanguageForm_ClassLibrary = “proint”

Contains the name of the class library that contains the User Language form class if cUserLanguageForm contains the name of a form class.

cUserSelectionLanguages = “”

Holds a comma-delimited list of the languages that the current user can select.

lAddRecs_Caption = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_Constant = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_ControlSource = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_DownPicture = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_DragIcon = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_Font = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_Icon = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_InputMask = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_Menu = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_Picture = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_RecordSource = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_Report = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_RowSource = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_StatusBarText = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lAddRecs_ToolTipText = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lCurrencySymbolLeft = .T.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lMessageTranslated = .F.

Set by the TranslateMessage method to identify whether or not the message was translated.

lStringTranslated = .F.

Set by the TranslateString method to identify whether or not the message was translated.

lTranslate_Caption = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_ControlSource = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_DownPicture = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_DragIcon = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_Font = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_Icon = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_InputMask = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_Messages = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_Picture = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_RecordSource = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_ReportFonts = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_RowSource = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_StatusBarText = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_Strings = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

lTranslate_ToolTipText = .F.

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

nCurrencyDecimals = 2

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

nDateFormat = 1

Holds the setting from the currently selected language’s record in the Languages view (SVPM_V!Languages_V).

nInitialFontSize_SCREEN = 0

Stores the initial _SCREEN property setting. (See Init event)

oLanguageRecord = .F.

Holds the record object created by the GetLanguageRecord method.

oMessageTranslationRecord = .F.

Holds the record object created by the GetMessageTranslationRecord method.

oStringTranslationRecord = .F.

Holds the record object created by the GetStringTranslationRecord method.

Methods

The following table lists the class methods. The methods listed include the standard Visual FoxPro class methods that the VPM Enterprise class uses and the VPM Enterprise custom methods. Where appropriate, the Comments column of the table describes a method and provides suggestions for its use.

Method

Comments

Standard Methods Used:

 

Destroy

Releases the object references stored in the oLanguageRecord, oMessageTranslationRecord, and oStringTranslationRecord properties.

Init

Saves _SCREEN’s initial property values so they can be reset before being translated. This is done so that the developer does not have to maintain translation strings for these property values from any given language to another.

Custom Methods:

 

GetLanguageRecord

Finds the record in the Languages view cursor for the specified language.

Parameter: stcLanguageID

GetMessageTranslationRecord

Finds the record in the Message Translations view cursor for the specified message.

Parameters: stcMessageID, stcLanguageID

GetStringTranslationRecord

Finds the record in the String Translations view cursor for the specified string.

Parameters: stcStringID, stcUse_ID, stcLanguageID

OpenAtStartup_PDS

Called by the OpenAtStartup_PDS method of the application object. Opens the multilingual view cursors that will remain open while the application is running. Leaving the cursors open will reduce network traffic and connection use. The cursors are opened in a private data session through the use of a Session object that was created in the InstantiateSessionObject method of the application object.

RunEnvironmentForm

Runs the form specified in the properties cEnvironmentForm and cEnvironmentForm_ClassLibrary.

RunLanguageManagerForm

Runs the form specified in the properties cLanguageManagerForm and cLanguageManagerForm_ClassLibrary.

RunLanguageSelectionForm

Runs the form specified in the properties cLanaguageSelectionForm and cLanaguageSelectionForm_ClassLibrary.

RunMessageTranslationsForm

Runs the form specified in the properties cMessageTranslationsForm and cMessageTranslationsForm_ClassLibrary.

RunStringManagerForm

Runs the form specified in the properties cStringManagerForm and cStringManagerForm_ClassLibrary.

RunStringTranslationsForm

Runs the form specified in the properties cStringTranslationsForm and cStringTranslationsForm_ClassLibrary.

RunTipForm

Runs the form specified in the properties cTipForm and cTipForm_ClassLibrary.

RunTipManagerForm

Runs the form specified in the properties cTipManagerForm and cTipManagerForm_ClassLibrary.

RunTipTranslationsForm

Runs the form specified in the properties cTipTranslationsForm and cTipTranslationsForm_ClassLibrary.

RunUserLanagaugeForm

Runs the form specified in the properties cUserLanguageForm and cUserLanguageForm_ClassLibrary.

SetCurrencyEnvironment

Modifies the currency settings of the data session specified in the parameter according to the currency settings of the current language.

Parameter: stnDataSessionID

SetDateEnvironment

Modifies the date settings of the data session specified in the parameter according to the date settings of the current language.

Parameter: stnDataSessionID

SetHelp

Issues the SET HELP command for the application. Uses the help file of the selected language or the default (Master Language) help file.

SetLanguage

Prepares the application to use the language specified in the parameter stcLang_ID.

Sets the object’s properties with values for the selected language. (See SetProperties method)

Sets the date settings of the default data session. (See SetDateEnvironment method)

Sets the currency settings of the default data session. (See SetCurrencyEnvironment method)

Sets the date settings of the session object’s private data session. (See SetDateEnvironment method)

Sets the currency settings of the session object’s private data session. (See SetCurrencyEnvironment method)

Translates the values in the properties of the application window (_SCREEN) after restoring the initial values. The property values are reset so that the developer does not have to maintain translation strings for these property values from any given language to another. (See Init event)

Displays the logo and copyright notice.

Issues the SET HELP command for the application. (See SetHelp method)

Runs the application’s main menu.

Parameters: stcLang_ID, stlDisplayLogo, stlDoNotRunMainMenu

SetProperties

Sets the object’s properties with the values of the selected language.

Parameter: stcLang_ID

TranslateCaption

Translates the Caption property of the object whose object reference is passed to this method.

Parameters: stoObject, stlForceTranslation, stlBypass

TranslateControlSource

Translates the ControlSource property of the object whose object reference is passed to this method.

Parameters: stoObject, stlForceTranslation, stlBypass

TranslateDownPicture

Translates the DownPicture property of the object whose object reference is passed to this method.

Parameters: stoObject, stlForceTranslation, stlBypass

TranslateDragIcon

Translates the DragIcon property of the object whose object reference is passed to this method.

Parameters: stoObject, stlForceTranslation, stlBypass

TranslateFont

Translates the FontName and FontSize properties of the object whose object reference is passed to this method.

Parameters: stoObject, stlForceTranslation, stlBypass

TranslateFonts_ReportLabel

Translates the fonts used in the report or label specified in the stcFileName parameter. It does this by making a copy of the report or label files and modifying the contents of the Fontface and Fontsize fields.

Parameters: stcFileName, stcFileType

TranslateIcon

Translates the Icon property of the object whose object reference is passed to this method.

Parameters: stoObject, stlForceTranslation, stlBypass

TranslateInputMask

Translates the InputMask property of the object whose object reference is passed to this method.

Parameters: stoObject, stlForceTranslation, stlBypass

TranslateMessage

Performs the message translation. Uses the Message ID string that is passed to this method to find a record in the message translations view (MessageTranslations_V) that contains the translated string.

Parameters: stcMessageID, stlForceTranslation

TranslateObject

Translates the properties of the object whose object reference is passed to this method. If the object contains other objects, translates the properties of those objects as well.

Parameters: stoObject, stlForceTranslation

TranslatePicture

Translates the Picture property of the object whose object reference is passed to this method.

Parameters: stoObject, stlForceTranslation, stlBypass

TranslateProperties

Translates the properties of the object whose object reference is passed to this method. It does this by calling the methods that translate individual properties (TranslateCaption, TranslateControlSource, etc.).

Parameters: stoObject, stlForceTranslation, stlBypass

TranslateRecordSource

Translates the RecordSource property of the object whose object reference is passed to this method.

Parameters: stoObject, stlForceTranslation, stlBypass

TranslateRowSource

Translates the RowSource property of the object whose object reference is passed to this method.

Parameters: stoObject, stlForceTranslation, stlBypass

TranslateStatusBarText

Translates the StatusBarText property of the object whose object reference is passed to this method.

Parameters: stoObject, stlForceTranslation, stlBypass

TranslateString

Performs the string translation. Uses the String ID and Use ID strings that are passed to this method to find a record in the string translations view (StringTranslations_V) that contains the translated string.

Parameters: stcStringID, stcUse_ID, stlNoNewRecord, stlForceTranslation, stlBypass

TranslateToolTipText

Translates the ToolTipText property of the object whose object reference is passed to this method.

Parameters: stoObject, stlForceTranslation, stlBypass

UpdateStrings

Updates the String Definition table SVPMStrings.

Parameters: stcStringID, stcUse_ID, stlNoNewRecord

UpdateStringTranslationRecord

Updates the text in the record in the String Translations view cursor for the specified string.

Parameters: stcStringID, stcUse_ID, stcLanguageID, stcUpdateText

 

More:

Application Files