Language Property

Applies to TestComplete 15.64, last modified on June 12, 2024


A file can contain multiple version information blocks translated in different languages. The Language property lets you get the language of a particular version information block.



Read-Only Property String
aqFileVersionInfoObj An expression, variable or parameter that specifies a reference to an aqFileVersionInfo object
Index [in]    Optional    Integer Default value: 0   

Applies To

The property is applied to the following object:


The property has the following parameter:


A zero-based index of the desired version information block. Default is 0. To get the total number of version information translations in the file, use the Languages property.

Property Value

A string that holds the language description. For example, “English (United States)”, “Language Neutral”, and so on. For a full list of language strings, see the Language Identifiers and Locales article in the MSDN library.


If you use Python or DelphiScript, you should enclose the parameter of the Language property in square brackets: Language[Index].


The following example posts information about Notepad’s version information translations to the test log:

JavaScript, JScript

function VersionInfoSample()
  var FileName = Sys.OSInfo.WindowsDirectory + "\\notepad.exe";
  var VerInfo = aqFileSystem.GetFileInfo(FileName).VersionInfo;

  for (var i = 0; i < VerInfo.Languages; i++)
    Log.Message("Language: " + VerInfo.Language(i) + ", Code page: " + VerInfo.CodePage(i));
  Log.Message("Total number of languages: " + VerInfo.Languages);


def VersionInfoSample():
  FileName = Sys.OSInfo.WindowsDirectory + "\\notepad.exe"
  VerInfo = aqFileSystem.GetFileInfo(FileName).VersionInfo
  for i in range(0, VerInfo.Languages):
    Log.Message("Language: " + VerInfo.Language[i] + ", Code page: " + str(VerInfo.CodePage[i]))
  Log.Message("Total number of languages: " + str(VerInfo.Languages))


Sub VersionInfoSample
  Dim FileName, VerInfo, i

  FileName = Sys.OSInfo.WindowsDirectory & "\notepad.exe"
  Set VerInfo = aqFileSystem.GetFileInfo(FileName).VersionInfo

  For i = 0 To VerInfo.Languages - 1
    Log.Message "Language: " & VerInfo.Language(i) & ", Code page: " & VerInfo.CodePage(i)
  Log.Message "Total number of languages: " & VerInfo.Languages
End Sub


procedure VersionInfoSample;
var FileName, VerInfo, i;
  FileName := Sys.OSInfo.WindowsDirectory + '\notepad.exe';
  VerInfo := aqFileSystem.GetFileInfo(FileName).VersionInfo;

  for i := 0 to VerInfo.Languages - 1 do
    Log.Message('Language: ' + VerInfo.Language[i] + ', Code page: ' + VerToStr(VerInfo.CodePage[i]));
  Log.Message('Total number of languages: ' + VarToStr(VerInfo.Languages));

C++Script, C#Script

function VersionInfoSample()
  var FileName = Sys["OSInfo"]["WindowsDirectory"] + "\\notepad.exe";
  var VerInfo = aqFileSystem["GetFileInfo"](FileName)["VersionInfo"];

  for (var i = 0; i < VerInfo["Languages"]; i++)
    Log["Message"]("Language: " + VerInfo["Language"](i) + ", Code page: " + VerInfo["CodePage"](i));
  Log["Message"]("Total number of languages: " + VerInfo["Languages"]);

See Also

CodePage Property
Languages Property

Highlight search results