Documentation Center

Translation Lists

The collection PslTransLists contains the translation lists of a project. Your access this collection with PslProject.TransLists.

This example lists all translation lists of the current project:

Sub Main
  Dim prj As PslProject
  Set prj = PSL.ActiveProject
  If prj Is Nothing Then Exit Sub
  Dim i As Integer
  For i = 1 To prj.TransLists.Count
    Dim trn As PslTransList
    Set trn = prj.TransLists(i)
    PSL.Output trn.SourceList.Title & " - " & trn.Language.LangCode
  Next i
End Sub

Because PslTransLists is a collection, the loop can be easier written as:

Dim trn As PslSourceList
For Each trn In prj.TransLists
  PSL.Output trn.SourceList.Title & " - " & trn.Language.LangCode
Next trn

The current source list, i.e. the translation list from the active window or the translation list that is selected in the project window, can be accessed with PassoloApp.ActiveTransList.