Copy language and add prefix to each text

We need to create a "dummy language" for testing.

We need it for clarify which texts are translatable and which are not.

How can I copy content of English target to another target (for example Tatar) where all texts in Tatar column would be corresponding copy text from English with prefix (specifically "▲" character).

Example:

Source text: "Fehler"

English translation: "Error"

Tatar translation: "▲Error"

emoji
Parents
  • Thanks  for the code you provided me. It really helped me.

    And this is the solution:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    Sub Main
    Dim prj As PslProject
    Set prj = PSL.ActiveProject
    Dim dstTransList As PslTransList
    Set dstTransList = PSL.ActiveTransList
    Dim dstSourceList As PslSourceList
    Set dstSourceList = prj.SourceLists.Item(2)
    ' Get English translation List
    Dim engTransList As PslTransList
    For i = 1 To prj.TransLists.Count
    Set engTransList = prj.TransLists.Item(i)
    If engTransList.SourceList.ListID = dstSourceList.ListID And engTransList.Language.LangID = 9 Then
    Exit For
    End If
    Next i
    ' Populate dummy translation
    For j = 1 To dstTransList.StringCount
    Dim dstTransString As PslTransString
    Set dstTransString = dstTransList.String(j)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    emoji
Reply
  • Thanks  for the code you provided me. It really helped me.

    And this is the solution:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    Sub Main
    Dim prj As PslProject
    Set prj = PSL.ActiveProject
    Dim dstTransList As PslTransList
    Set dstTransList = PSL.ActiveTransList
    Dim dstSourceList As PslSourceList
    Set dstSourceList = prj.SourceLists.Item(2)
    ' Get English translation List
    Dim engTransList As PslTransList
    For i = 1 To prj.TransLists.Count
    Set engTransList = prj.TransLists.Item(i)
    If engTransList.SourceList.ListID = dstSourceList.ListID And engTransList.Language.LangID = 9 Then
    Exit For
    End If
    Next i
    ' Populate dummy translation
    For j = 1 To dstTransList.StringCount
    Dim dstTransString As PslTransString
    Set dstTransString = dstTransList.String(j)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    emoji
Children
No Data