Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
1 change: 1 addition & 0 deletions api/projectautomation/.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,7 @@
"Sdl.ProjectAutomation.Settings.TranslationMemorySettings.HardFilter": "Sdl.ProjectAutomation.Settings.TranslationMemorySettings.yml",
"Sdl.ProjectAutomation.Settings.TranslationMemorySettings.LongDatePattern": "Sdl.ProjectAutomation.Settings.TranslationMemorySettings.yml",
"Sdl.ProjectAutomation.Settings.TranslationMemorySettings.LongTimePattern": "Sdl.ProjectAutomation.Settings.TranslationMemorySettings.yml",
"Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MaximumContextSegments": "Sdl.ProjectAutomation.Settings.TranslationMemorySettings.yml",
"Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MeasurementsAutoLocalizationEnabled": "Sdl.ProjectAutomation.Settings.TranslationMemorySettings.yml",
"Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MeasurementsFormattingCustomSpace": "Sdl.ProjectAutomation.Settings.TranslationMemorySettings.yml",
"Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MeasurementsFormattingMode": "Sdl.ProjectAutomation.Settings.TranslationMemorySettings.yml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ items:
- Sdl.ProjectAutomation.Settings.TranslationMemorySettings.HardFilter
- Sdl.ProjectAutomation.Settings.TranslationMemorySettings.LongDatePattern
- Sdl.ProjectAutomation.Settings.TranslationMemorySettings.LongTimePattern
- Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MaximumContextSegments
- Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MeasurementsAutoLocalizationEnabled
- Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MeasurementsFormattingCustomSpace
- Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MeasurementsFormattingMode
Expand Down Expand Up @@ -693,6 +694,29 @@ items:
type: Sdl.Core.Settings.Setting{System.Int32}
content.vb: Public ReadOnly Property ConcordanceMaximumResults As Setting(Of Integer)
overload: Sdl.ProjectAutomation.Settings.TranslationMemorySettings.ConcordanceMaximumResults*
- uid: Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MaximumContextSegments
commentId: P:Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MaximumContextSegments
id: MaximumContextSegments
parent: Sdl.ProjectAutomation.Settings.TranslationMemorySettings
langs:
- csharp
- vb
name: MaximumContextSegments
nameWithType: TranslationMemorySettings.MaximumContextSegments
fullName: Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MaximumContextSegments
type: Property
assemblies:
- Sdl.ProjectAutomation.Settings
namespace: Sdl.ProjectAutomation.Settings
summary: 'Gets or sets the maximum number of context segments. Default: 1.'
example: []
syntax:
content: public Setting<int> MaximumContextSegments { get; }
parameters: []
return:
type: Sdl.Core.Settings.Setting{System.Int32}
content.vb: Public ReadOnly Property MaximumContextSegments As Setting(Of Integer)
overload: Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MaximumContextSegments*
- uid: Sdl.ProjectAutomation.Settings.TranslationMemorySettings.StopSearchingWhenResultsFound
commentId: P:Sdl.ProjectAutomation.Settings.TranslationMemorySettings.StopSearchingWhenResultsFound
id: StopSearchingWhenResultsFound
Expand Down Expand Up @@ -3013,6 +3037,13 @@ references:
name: ConcordanceMaximumResults
nameWithType: TranslationMemorySettings.ConcordanceMaximumResults
fullName: Sdl.ProjectAutomation.Settings.TranslationMemorySettings.ConcordanceMaximumResults
- uid: Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MaximumContextSegments*
commentId: Overload:Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MaximumContextSegments
isExternal: true
href: Sdl.ProjectAutomation.Settings.TranslationMemorySettings.html#Sdl_ProjectAutomation_Settings_TranslationMemorySettings_MaximumContextSegments
name: MaximumContextSegments
nameWithType: TranslationMemorySettings.MaximumContextSegments
fullName: Sdl.ProjectAutomation.Settings.TranslationMemorySettings.MaximumContextSegments
- uid: Sdl.ProjectAutomation.Settings.TranslationMemorySettings.StopSearchingWhenResultsFound*
commentId: Overload:Sdl.ProjectAutomation.Settings.TranslationMemorySettings.StopSearchingWhenResultsFound
isExternal: true
Expand Down
2 changes: 1 addition & 1 deletion api/translationmemory/.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3062,7 +3062,7 @@
"Sdl.LanguagePlatform.TranslationMemory.TranslationUnit.Validate": "Sdl.LanguagePlatform.TranslationMemory.TranslationUnit.yml",
"Sdl.LanguagePlatform.TranslationMemory.TranslationUnit.Validate(Sdl.LanguagePlatform.Core.Segment.ValidationMode)": "Sdl.LanguagePlatform.TranslationMemory.TranslationUnit.yml",
"Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation": "Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.yml",
"Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.#ctor(System.Guid,System.Int32,System.String,System.Int32)": "Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.yml",
"Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.#ctor(System.Guid,System.Int32,System.String,System.String)": "Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.yml",
"Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.Id": "Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.yml",
"Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.SegmentNumber": "Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.yml",
"Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.Title": "Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.yml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ items:
id: TranslationUnitBcmInformation
parent: Sdl.LanguagePlatform.TranslationMemory
children:
- Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.#ctor(System.Guid,System.Int32,System.String,System.Int32)
- Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.#ctor(System.Guid,System.Int32,System.String,System.String)
- Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.Id
- Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.SegmentNumber
- Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.Title
Expand Down Expand Up @@ -38,24 +38,24 @@ items:
- System.Object.GetHashCode
- System.Object.GetType
- System.Object.MemberwiseClone
- uid: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.#ctor(System.Guid,System.Int32,System.String,System.Int32)
commentId: M:Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.#ctor(System.Guid,System.Int32,System.String,System.Int32)
id: '#ctor(System.Guid,System.Int32,System.String,System.Int32)'
- uid: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.#ctor(System.Guid,System.Int32,System.String,System.String)
commentId: M:Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.#ctor(System.Guid,System.Int32,System.String,System.String)
id: '#ctor(System.Guid,System.Int32,System.String,System.String)'
parent: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation
langs:
- csharp
- vb
name: TranslationUnitBcmInformation(Guid, int, string, int)
nameWithType: TranslationUnitBcmInformation.TranslationUnitBcmInformation(Guid, int, string, int)
fullName: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.TranslationUnitBcmInformation(System.Guid, int, string, int)
name: TranslationUnitBcmInformation(Guid, int, string, string)
nameWithType: TranslationUnitBcmInformation.TranslationUnitBcmInformation(Guid, int, string, string)
fullName: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.TranslationUnitBcmInformation(System.Guid, int, string, string)
type: Constructor
assemblies:
- Sdl.LanguagePlatform.TranslationMemory
namespace: Sdl.LanguagePlatform.TranslationMemory
summary: ''
example: []
syntax:
content: public TranslationUnitBcmInformation(Guid id, int version, string title, int segmentNumber)
content: public TranslationUnitBcmInformation(Guid id, int version, string title, string segmentNumber)
parameters:
- id: id
type: System.Guid
Expand All @@ -64,12 +64,12 @@ items:
- id: title
type: System.String
- id: segmentNumber
type: System.Int32
content.vb: Public Sub New(id As Guid, version As Integer, title As String, segmentNumber As Integer)
type: System.String
content.vb: Public Sub New(id As Guid, version As Integer, title As String, segmentNumber As String)
overload: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.#ctor*
nameWithType.vb: TranslationUnitBcmInformation.New(Guid, Integer, String, Integer)
fullName.vb: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.New(System.Guid, Integer, String, Integer)
name.vb: New(Guid, Integer, String, Integer)
nameWithType.vb: TranslationUnitBcmInformation.New(Guid, Integer, String, String)
fullName.vb: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.New(System.Guid, Integer, String, String)
name.vb: New(Guid, Integer, String, String)
- uid: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.Id
commentId: P:Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.Id
id: Id
Expand Down Expand Up @@ -156,14 +156,14 @@ items:
content: >-
[DataMember]

public int SegmentNumber { get; set; }
public string SegmentNumber { get; set; }
parameters: []
return:
type: System.Int32
type: System.String
content.vb: >-
<DataMember>

Public Property SegmentNumber As Integer
Public Property SegmentNumber As String
overload: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.SegmentNumber*
attributes:
- type: System.Runtime.Serialization.DataMemberAttribute
Expand Down Expand Up @@ -480,7 +480,7 @@ references:
- uid: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.#ctor*
commentId: Overload:Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.#ctor
isExternal: true
href: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.html#Sdl_LanguagePlatform_TranslationMemory_TranslationUnitBcmInformation__ctor_System_Guid_System_Int32_System_String_System_Int32_
href: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.html#Sdl_LanguagePlatform_TranslationMemory_TranslationUnitBcmInformation__ctor_System_Guid_System_Int32_System_String_System_String_
name: TranslationUnitBcmInformation
nameWithType: TranslationUnitBcmInformation.TranslationUnitBcmInformation
fullName: Sdl.LanguagePlatform.TranslationMemory.TranslationUnitBcmInformation.TranslationUnitBcmInformation
Expand Down
81 changes: 38 additions & 43 deletions apiconcepts/filetypesupport/about_the_example_bil_format.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
About the Example BIL Format
===
# About the Example BIL Format

In order to demonstrate the main features that can be used when developing a bilingual file type plug-in, we have created an example format with the extension **.bil* (from now on BIL). This file type is not used in any 3rd party application. It is a fictitious document format, which was created only for this SDK sample project.
To demonstrate the main features of a bilingual file type plug-in, this sample uses a fictitious format with the `.bil` extension. This format does not belong to a third-party application. It exists only for this SDK sample.

Format Description
--
## Format Description

BIL is custom a XML based format which looks as shown below:
BIL is a custom XML-based format, as shown in the following example:

# [Xml](#tab/tabid-1)
# [XML](#tab/tabid-1)
```xml
<bilingualdocument source-language="en-US" target-language="de-DE">
<unit id="1" status="exact">
Expand All @@ -22,43 +20,42 @@ BIL is custom a XML based format which looks as shown below:
<b>Leistungsmerkmale</b>
</seg>
</target>
<comment id="1">This segment was translated using web translator.</comment>
<comment id="1">This segment was translated using web translator.</comment>
<type spec="Heading"/>
</unit>
</bilingualdocument>
```
***


The BIL format contains the following elements:

* ```bilingualdocument```: The root element, in which the source and the target languages are specified within element attributes.
* ```unit```: Acts as the container for the source and the target content. Each unit element is identified by the unique value of the id attribute. Also the unit element contains a status attribute, which defines whether the current unit is, for example, new or an exact match.
* ```source```: Contains one seg element, which stores the actual source segment content.
* ```target```: Can contain a seg element for storing the target content. The target element can be empty if no target segment is available.
* ```seg```: Encloses the actual source or target content. Segment content may be enclosed in inline tags such as *< b >*, *< i >*, etc.
* ```type```: Contains additional information on the type of unit, e.g. heading, paragraph, footnote, etc.
* ```comment```: contains a comment related to a unit (if applicable). To keep this example as simple as possible, let us assume that a unit can only have one comment.
- `bilingualdocument`: The root element. Its attributes specify the source and target languages.
- `unit`: The container for the source and target content. Each `unit` has a unique `id` attribute and a `status` attribute that identifies the translation state, such as `new` or `exact`.
- `source`: Contains a `seg` element that stores the source segment content.
- `target`: Can contain a `seg` element that stores the target content. The `target` element can remain empty when no target segment is available.
- `seg`: Encloses the source or target content. Segment content can contain inline tags such as `<b>` and `<i>`.
- `type`: Contains additional information about the unit type, such as heading, paragraph, or footnote.
- `comment`: Contains a comment for a unit, when applicable. For simplicity, this example assumes that each unit has at most one comment.

What the Sample File Type Plug-in Must Do
--
## What the Sample File Type Plug-in Must Do

Your file type plug-in needs to fulfill the following requirements:
The sample file type plug-in must:

* Generate an SDLXliff file from a given BIL document
* Traverse the BIL file and extract all units; each unit shall represent a paragraph in the translation editor of Var:ProductName
* Expose all source segments for translation
* Expose all target segments (if available)
* Markup inline tags such as *< b>* as tag pairs within the segments and apply the appropriate display formatting
* Generate (untranslatable) contexts from the type attribute values (e.g. heading)
* Map the BIL unit status values to the appropriate confirmation levels found in the intermediary format used by Var:ProductName (i.e. SDLXliff), e.g. translated, draft, approved, etc.
* Back conversion, i.e. writing back the content from the intermediary document (SDLXliff)into a target BIL file
- Generate an SDLXLIFF file from a BIL document.
- Traverse the BIL file and extract all units so that each unit appears as a paragraph in the Var:ProductName translation editor.
- Expose all source segments for translation.
- Expose all target segments, when available.
- Mark up inline tags such as `<b>` as tag pairs within segments and apply the correct display formatting.
- Generate untranslatable contexts from `type` attribute values such as `heading`.
- Map BIL `status` values to the appropriate confirmation levels in the intermediary format used by Var:ProductName, such as `translated`, `draft`, and `approved`.
- Support back-conversion by writing content from the intermediary SDLXLIFF document to a target BIL file.

When developing the sample file type plug-in we fill primarily focus on extraction (file parser) and generation (file writer) as well as ways of mapping BIL features to SDLXliff features. We will not implement additional functionality such as QuickInsert, user-configurable settings, or document preview, as this is already covered in the chapter on developing a native file type plug-in.
This sample focuses on extraction through the file parser, generation through the file writer, and mapping BIL features to SDLXLIFF features. It does not implement additional functionality such as QuickInsert, user-configurable settings, or document preview, because the chapter on developing a native file type plug-in already covers those topics.

Example Document
Below you see an example of a more comprehensive document, which you can use for testing your BIL file type plug-in:
## Example Document

# [Xml](#tab/tabid-2)
The following example shows a more comprehensive document that you can use to test your BIL file type plug-in:

# [XML](#tab/tabid-2)
```xml
<?xml version="1.0" encoding="utf-8"?>
<bilingualdocument source-language="en-US" target-language="de-DE">
Expand All @@ -73,7 +70,7 @@ Below you see an example of a more comprehensive document, which you can use for
<b>Leistungsmerkmale</b>
</seg>
</target>
<comment id="1">This segment was translated using web translator.</comment>
<comment id="1">This segment was translated using web translator.</comment>
<type spec="Heading"/>
</unit>
<unit id="2" status="fuzzy">
Expand All @@ -95,38 +92,36 @@ Below you see an example of a more comprehensive document, which you can use for
<b>The largest translation supply chain in the world</b>
</seg>
</source>
<target></target>
<target />
<type spec="Heading"/>
</unit>
<unit id="4" status="new">
<source>
<seg><i>Trados Studio</i> is the world’s most popular translation software with over 170,000 users.</seg>
</source>
<target></target>
<type spec="Box"/>
<target />
<type spec="Box"/>
</unit>
<unit id="5" status="new">
<source>
<seg>
<b>Dedicated translation environment to handle almost any file type</b>
</seg>
</source>
<target></target>
<target />
<type spec="Heading"/>
</unit>
<unit id="6" status="new">
<source>
<seg><b>Easily open</b> and start working on the widest range of file formats, from the latest Microsoft Office files to XML, from HTML to InDesign.</seg>
</source>
<target></target>
<type spec="Box"/>
<comment id="1">This is the original comment</comment>
<target />
<type spec="Box"/>
<comment id="1">This is the original comment</comment>
</unit>
</bilingualdocument>
```
***


>[!NOTE]
>
> This content may be out-of-date. To check the latest information on this topic, inspect the libraries using the Visual Studio Object Browser.
> This content may be out of date. To verify the latest information on this topic, inspect the libraries in the Visual Studio Object Browser.
Loading
Loading