| IParagraphUnit Interface |
Namespace: Sdl.FileTypeSupport.Framework.BilingualApi
The IParagraphUnit type exposes the following members.
| Name | Description | |
|---|---|---|
| IsStructure | true if this is a structure ParagraphUnit, i.e. a paragraph unit that
contains no localizable content (i.e. structure tags and whitespace only).
| |
| Properties |
Information on this paragraph unit
| |
| SegmentPairs |
Iterator for easy access to the source and target segments in the ParagraphUnit
| |
| Source |
Source language content of the ParagraphUnit
| |
| Target |
Target language content of the ParagraphUnit
|
| Name | Description | |
|---|---|---|
| GetSegmentPair |
Get the source and target segment with a specified id.
| |
| GetSourceSegment |
Returns the segment with the specified id if it exists in the source of this ParagraphUnit.
| |
| GetSourceSegmentLocation |
Locates the segment with the specified id inside the source.
| |
| GetTargetSegment |
Returns the segment with the specified id if it exists in the target of this ParagraphUnit.
| |
| GetTargetSegmentLocation |
Locates the segment with the specified id inside the target.
|
There are two types of paragraph units: those that contain localizable content, and those that do not contain localizable content. The latter is referred to as a structure paragraph unit, and typically only contains structure tags and associated whitespace. The IsStructure property indicates whether this paragraph unit is a structure paragraph unit. Since the content of structure paragraph units is not localized, their Target property is null.
Paragraph units that are not structure paragraph units are referred to as localizable paragraph units. They normally have both Source and Target, and never contain structure tags.
The Properties of the paragraph unit contains associated information, including contexts and the paragraph unit's unique id.
The content in localizable paragraph units is typically divided into segments. A segment is usually a sentence. Segments exist in source and target language versions, and you can iterate over them using the SegmentPairs property.
When processing content in a localizable paragraph, it is important to be aware of the fact that the segments do not represent all content of the paragraph. There may also be content between segments. Examples of such content include space characters (which separate sentences), tags that appearr between sentences, etc. Content between segments can differ between the Source and Target.
To iterate over content between segments you can use a Location. The GetSourceSegmentLocation(SegmentId) and GetTargetSegmentLocation(SegmentId) methods can be useful for this task.
The GetSourceSegment(SegmentId) and GetTargetSegment(SegmentId) methods provide a convenient way of locating the corresponding source/target version for a segment.