| IFileTypeManagerGetConverterToBilingual Method (String, IBilingualDocumentGenerator, BilingualDocumentOutputPropertiesProvider, EventHandlerMessageEventArgs) |
Creates and initializes a file converter for a single file, typically of the default bilingual file type.
The specified bilingual document generator will be used for output.
The file type definitions are tested in order, and the first file type definition that
matches the input file is used. The following steps are used to determine if
a file type definition matches the file:
- The regular expression is evaluated against the name of the file to be converted. If it does not match,
the file type definition is not used.
- If a file sniffer is defined for the file type definition, it gets applied to the file. If the file sniffer
does not indicate that the file is supported, the file type definition is not used.
If no matching file type definition is found, a
OneOrMoreFilesNotSupportedException is thrown.
Namespace: Sdl.FileTypeSupport.Framework.IntegrationApiAssembly: Sdl.FileTypeSupport.Framework.Core (in Sdl.FileTypeSupport.Framework.Core.dll) Version: 1.0.0.0 (1.0.2343.0)
SyntaxIMultiFileConverter GetConverterToBilingual(
string bilingualInputFilePath,
IBilingualDocumentGenerator writer,
BilingualDocumentOutputPropertiesProvider outputSettingsProvider,
EventHandler<MessageEventArgs> messageHandler
)
Function GetConverterToBilingual (
bilingualInputFilePath As String,
writer As IBilingualDocumentGenerator,
outputSettingsProvider As BilingualDocumentOutputPropertiesProvider,
messageHandler As EventHandler(Of MessageEventArgs)
) As IMultiFileConverter
IMultiFileConverter^ GetConverterToBilingual(
String^ bilingualInputFilePath,
IBilingualDocumentGenerator^ writer,
BilingualDocumentOutputPropertiesProvider^ outputSettingsProvider,
EventHandler<MessageEventArgs^>^ messageHandler
)
abstract GetConverterToBilingual :
bilingualInputFilePath : string *
writer : IBilingualDocumentGenerator *
outputSettingsProvider : BilingualDocumentOutputPropertiesProvider *
messageHandler : EventHandler<MessageEventArgs> -> IMultiFileConverter
Parameters
- bilingualInputFilePath
- Type: SystemString
The file to be converted. The language and code page of this file is expected
to be automatically detected by the file sniffer, no external hints should be necessary. - writer
- Type: Sdl.FileTypeSupport.Framework.IntegrationApiIBilingualDocumentGenerator
Bilingual writer to use as output with the converter - outputSettingsProvider
- Type: Sdl.FileTypeSupport.Framework.IntegrationApiBilingualDocumentOutputPropertiesProvider
Implementation of the output settings provider for bilingual
document files. Will be passed to the multi-file converter and used for writing bilingual document files.
If the bilingual document generator does not have a bilingual document file writer, you can pass null
for this parameter. - messageHandler
- Type: SystemEventHandlerMessageEventArgs
An (optional) message handler implementation that will receive any messages reported
from file sniffers invoked in the process. If a converter is returned, this message handler will also be
connected to the Message event on the converter. You may specify null for this parameter.
Return Value
Type:
IMultiFileConverterA file converter object initialized to read the file, based on information from the best matching file type definition.
To use the file converter, add your own bilingual processors to the converter, and call
Parse or
ParseNext to process the file.
Exceptions
See Also
Comments