RC-WinTrans Object Model Help |
TranslationProject.WritergetFile |
Writes all target files or one single (translated) target file in the specified language.
The target file name rule and the target file encoding designated in the project will be used. By default, a target file is written when it is outdated - otherwise it is skipped.
To force all target files to be written anew, use the parameter forceAll (=True).
Syntax: |
WritergetFile(pojFile As String, SrcFile As String, TgtFile As String, Lang As String, LogFile As String forceAll AS Boolean ) As long |
Return: | long The number of target files written successfully. Note on error(s): The information that a target file could not be written is not returned with the return value. Use the Error object to check if there was an error and if a file could not be written. See the example below. |
Parameters: |
pojFile As String Project file name; the full path to the translation project file (.rwtproject) or the project database file (.fsmdb). SrcFile As String (can be empty) TgtFile As String (can be empty) The parameter is ignored when the 'srcFile' parameter is empty. Lang As String LogFile As String (can be empty) forceAll As Boolean
|
Example: | Dim Proj As TranslationProject Dim nFiles As long Set Proj = RCWinTrans.OpenGetProject("MyProj.fsmdb", "ch_CHS", False) nFiles = Proj..WriteTargetFile("","", "ch-CHS","",True) If RCWinTrans.Errors.Count > 0 Then MsgBox RCWinTrans.Errors.LastError End If |
See also: