Language.LangCode not set for some target languages in Passolo


In a macro, we use the target language of a string list, namely the language code, e.g., "des" for "German (Switzerland)". For some languages, e.g. "German (Belgium)" there is no language code returned by Passolo. The following code is working fine for "German (Switzerland)" and "German (Austria)" but not for "German (Belgium)". Is there a reason for this? Thanks in advance.


In a macro, we use the target language of a string list, namely the language code, e.g., "des" for "German (Switzerland)". For some languages, e.g. "German (Belgium)" there is no language code returned by Passolo. The following code is working fine for "German (Switzerland)" and "German (Austria)" but not for "German (Belgium)". Is there a reason for this? Thanks in advance.

In a macro, we use the target language of a string list, namely the language code, e.g., "des" for "German (Switzerland)". For some languages, e.g. "German (Belgium)" there is no language code returned by Passolo. The following code is working fine for "German (Switzerland)" and "German (Austria)" but not for "German (Belgium)". Is there a reason for this? Thanks in advance.

Sub HandleSourceString(s As PslSourceString)
	' Do something with s
End Sub

Sub HandleTransString(t As PslTransString)
	PSL.Output(t.TransList.Language.LangCode)
End Sub

Sub Main
	Dim i As Long
	Dim selcount As Long

	' Source List
	Dim srcdisp As PslSourceDisplay
	Set srcdisp = PSL.ActiveSourceDisplay
	If Not srcdisp Is Nothing Then
		selcount = srcdisp.StringCount(pslSelection)
		For i = 1 To selcount
			HandleSourceString(srcdisp.String(i, pslSelection))
		Next i
	End If

	' Translation List
	Dim trndisp As PslTransDisplay
	Set trndisp = PSL.ActiveTransDisplay
	If Not trndisp Is Nothing Then
		selcount = trndisp.StringCount(pslSelection)
		For i = 1 To selcount
			HandleTransString(trndisp.String(i, pslSelection))
		Next i
	End If

	If srcdisp Is Nothing And trndisp Is Nothing Then
		MsgBox "No active string list found."
	End If

End Sub

emoji