Setting the language for OLE objects and controls
When you write automation commands, you generally use commands
that match the locale for your computer. If your locale and your
users’ locale will differ, you can specify the language
you have used for automation with the SetAutomationLocale function.
You can call SetAutomationLocale for OLE
controls, custom controls, and OLEObjects, and you can specify a
different locale for each automation object in your application.
For example, if you are developing your application in Germany
and will deploy it all over Europe, you can specify the automation
language is German. Use this syntax for an OLE control called ole_1:
1 |
ole_1.Object.SetAutomationLocale(LanguageGerman!) |
Use this syntax for an OLEObject called oleobj_report:
1 |
oleobj_report.SetAutomationlocale(LanguageGerman!) |
The users of your application must have the German automation
interface for the OLE server application.
When your users install an OLE server application (particularly
an OLE application from Microsoft), they get an automation interface
in their native language and in English. It might not be appropriate
for you to write automation commands in your native language if
your users have a different language.
For more information, see the SetAutomationLocale function
in the PowerScript Reference.