PslProject.ExportTransBundle
Creates translation bundle.
Syntax
Expression.ExportTransBundle (TransBundle as PslTransBundle, FileName as String) as Boolean
Expression Object of type PslProject
TransBundle Translation bundle object, which contains the translation lists, glossaries and macros
FileName Path and name of the exported translation bundle. Passolo ensures that the file name has the right file extension:
.tbu Translation bundle from Passolo
.tbulic700 Licensed translation bundle from Passolo 2007
Example
' Creates a translation bundle for each language
Sub main
Dim prj As PslProject
Set prj = PSL.ActiveProject
If prj Is Nothing Then Exit Sub
Dim lang As PslLanguage
For Each lang In prj.Languages
' Create the translation bundle
Dim bundle As PslTransBundle
Set bundle = prj.PrepareTransBundle
Dim trn As PslTransList
dim i as Integer
For i = 1 to prj.TransLists.Count
set trn = prj.TransLists(i)
If trn.Language Is lang Then
bundle.AddTransList(trn)
End If
Next i
' Add glossaries
bundle.AddGlossary("c:\Glossaries\myglossary.glo")
bundle.AddGlossary(PSL.Glossaries(1))
' AddMacro
bundle.AddMacro("PslCheckCPP.bas");
' Make filename "test<langcode>.tba/tbu"
Dim filename As String
filename = "c:\test\test" & lang.LangCode
prj.ExportTransBundle bundle, filename
Next lang
End Sub