Click or drag to resize
IParagraphUnit Interface
A continous unit of source language content within a single context, and (if applicable) the localized target language version of the content. This often corresponds to a paragraph of text in a native file.

Namespace: Sdl.FileTypeSupport.Framework.BilingualApi
Assembly: Sdl.FileTypeSupport.Framework.Core (in Sdl.FileTypeSupport.Framework.Core.dll) Version: 1.0.0.0 (1.0.2508.0)
Syntax
public interface IParagraphUnit : ICloneable

The IParagraphUnit type exposes the following members.

Properties
  NameDescription
Public propertyIsStructure
true if this is a structure ParagraphUnit, i.e. a paragraph unit that contains no localizable content (i.e. structure tags and whitespace only).
Public propertyProperties
Information on this paragraph unit
Public propertySegmentPairs
Iterator for easy access to the source and target segments in the ParagraphUnit
Public propertySource
Source language content of the ParagraphUnit
Public propertyTarget
Target language content of the ParagraphUnit
Top
Methods
  NameDescription
Public methodClone
Creates a new object that is a copy of the current instance.
(Inherited from ICloneable.)
Public methodGetSegmentPair
Get the source and target segment with a specified id.
Public methodGetSourceSegment
Returns the segment with the specified id if it exists in the source of this ParagraphUnit.
Public methodGetSourceSegmentLocation
Locates the segment with the specified id inside the source.
Public methodGetTargetSegment
Returns the segment with the specified id if it exists in the target of this ParagraphUnit.
Public methodGetTargetSegmentLocation
Locates the segment with the specified id inside the target.
Top
Remarks

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.

See Also
Community
Edit

Be the first to Edit the community content of this topic.
Comments