SYS(3005) - Set Locale ID

See Also

Sets the Locale ID used by automation and ActiveX controls.

Syntax

SYS(3005, nLocaleID)

Returns

Character

Arguments

nLocaleID

Specifies the Locale ID. The following list contains the Locale IDs supported in Visual FoxPro:

nLocaleID Language
1029 Czech
1031 German
1033 English (Default)
1034 Spanish
1036 French
1040 Italian
1045 Polish
1046 Portuguese (Brazilian)
2070 Portuguese (Standard)

Remarks

SYS(3005) sets the global Locale ID (LCID). The Locale ID determines the language in which automation and ActiveX controls exchange information. The default Visual FoxPro Locale ID is 1033, English.

Using the DefOLELCID Property is the preferred method for setting a Locale ID for a form or the main Visual FoxPro window. The automation command language is affected only by the Global LocaleID, set with SYS(3005). The DefOLELCID and OLELCID properties affect only the language of the user interface, which ActiveX controls display, and not the language of the automation commands.

For example, assume you have installed the German version of Microsoft Excel 5.0, which supports both English and German commands. In this case, the following example allows you to start and close the German version of Microsoft Excel 5.0:

oleExcel1 = CREATEOBJECT('Excel.Application')  && Starts Excel

? SYS(3005, 1033)  && English Locale ID
oleExcel.Quit  && Closes Excel with English command

oleExcel2 = CREATEOBJECT('Excel.Application')  && Starts Excel

? SYS(3005, 1031)  && German Locale ID
oleExcel.Beenden  && Closes Excel with German command

For additional information about Locale IDs, see the Microsoft Windows Software Development Kit documentation.