aqEnvironment.LanguageForNonUnicodePrograms Property

Applies to TestComplete 15.0, last modified on November 17, 2021

Description

The LanguageForNonUnicodePrograms property lets you get or set a system language for non-Unicode applications.

Declaration

aqEnvironment.LanguageForNonUnicodePrograms

Read-Write Property String

Applies To

The property is applied to the following object:

Property Value

The string specifying a system language for non-Unicode applications.

Remarks

  • To specify this property value, use the strings defined in the Control Panel | Regional and Language Options | Advanced | Language for non-Unicode programs option. If you type an incomplete language name as the value of this property, TestComplete will define the first language that starts with the specified string as the system language. For example, if you type Spanish as the value of this property, TestComplete will set the Spanish (Argentina) language as the system language. So, if you need the Spanish (Mexico) language, you must specify the full string, Spanish (Mexico), as the value of the LanguageForNonUnicodePrograms property.

  • Note that support for the needed language must be installed in the operating system before changing the language. To learn how to install language support, see Windows documentation.

  • If you change the setting, the changes will take effect only after the system is restarted. You can either restart the system manually or use the aqEnvironment.RebootAndContinue method.

  • You can also specify this property value as a locale name based on the language tagging conventions of RFC 4646. For example, the locale name for the English (United States) language is en-US. To learn more about locale names, see MSDN.

Example

The following code demonstrates how you can automatically set a new system language directly from your code. The Main procedure sets the Zulu language as the system language and then restarts the system. After system rebooting, the Unit1.Proc1 procedure is executed under the specified user account (UserName1 and Password1).

JavaScript, JScript

function Main()
{
  aqEnvironment.LanguageForNonUnicodePrograms = "Zulu";
  aqEnvironment.RebootAndContinue("Unit1.Proc1", "Password1", "UserName1", "");
}

Python

def Main():
  aqEnvironment.LanguageForNonUnicodePrograms = "Zulu"
  aqEnvironment.RebootAndContinue("Unit1.Proc1", "Password1", "UserName1", "")

VBScript

Sub Main
  aqEnvironment.LanguageForNonUnicodePrograms = "Zulu"
  aqEnvironment.RebootAndContinue "Unit1.Proc1", "Password1", "UserName1", ""
End Sub

DelphiScript

procedure Main;
begin
  aqEnvironment.LanguageForNonUnicodePrograms := 'Zulu';
  aqEnvironment.RebootAndContinue('Unit1.Proc1', 'Password1', 'UserName1', '');
end;

C++Script, C#Script

function Main()
{
  aqEnvironment["LanguageForNonUnicodePrograms"] = "Zulu";
  aqEnvironment["RebootAndContinue"]("Unit1.Proc1", "Password1", "UserName1", "");
}

See Also

Unicode Property
Setting the System Language From Scripts
Unicode Support

Highlight search results