CurrentLocaleName Property

Applies to TestComplete 14.70, last modified on April 22, 2021

Description

Returns the current locale of the Android device:

Declaration

ProgObj.CurrentLocaleName

Read-Only Property String
ProgObj An expression, variable or parameter that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following object:

Property Value

A string representing the current locale.

Example

JavaScript, JScript

function Test()
{
  // Specify the current device
  Mobile.SetCurrent("MyDevice");

  // Post information about the locale to the log
  Log.Message(Mobile.Device().CurrentLocaleName);

}

Python

def Test():
  # Specify the current device
  Mobile.SetCurrent("MyDevice")

  # Post information about the locale to the log
  Log.Message(Mobile.Device().CurrentLocaleName)

VBScript

Sub Test
  ' Specify the current device
  Call Mobile.SetCurrent("MyDevice")

  ' Post information about the locale to the log
  Call Log.Message(Mobile.Device.CurrentLocaleName)

End Sub

DelphiScript

procedure Test;
begin
  // Specify the current device
  Mobile.SetCurrent('MyDevice');

  // Post information about the locale to the log
  Log.Message(Mobile.Device.CurrentLocaleName);

end;

C++Script, C#Script

function Test()
{
  // Specify the current device
  Mobile["SetCurrent"]("MyDevice");

  // Post information about the locale to the log
  Log["Message"](Mobile["Device"]["CurrentLocaleName"]);

}

See Also

AndroidDevice Object
Testing Android Applications
Working With Android Device Settings During Test Run

Highlight search results