Interface IAbstractTagProperties
Common information on start tags, placeholder tags and structure tags (but not end tags).
Inherited Members
Namespace: Sdl.FileTypeSupport.Framework.NativeApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public interface IAbstractTagProperties : IAbstractBasicTagProperties, IMetaDataContainer, ICloneable
Remarks
These types of tags can have localizable content and unique tag identifiers.
Properties
HasLocalizableContent
True
if LocalizableContent is not null
, and has at least one sub-segment.
Declaration
bool HasLocalizableContent { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
LocalizableContent
Translatable content inside the tag, in the order in which it appears. An example of such content may be localizable attribute values in HTML or XML.
Declaration
IEnumerable<ISubSegmentProperties> LocalizableContent { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ISubSegmentProperties> |
Remarks
For convenience, test the HasLocalizableContent to determine if there is any localizable content for the tag.
To add or remove localizable content, call AddSubSegment(ISubSegmentProperties) or RemoveSubSegment(ISubSegmentProperties).
The sub-segments are ordered, with the lowest offset being listed first.
TagId
Identifier for a tag.
Tags originating from the native parser typically have unique ids.
In the bilingual content model, corresponding tags between source and target can be identified by their ids.
If a tag is cloned, it will have the same id as its clone. It may therefore happen during conversion from bilingual to native format that multiple tags have the same id. In such cases the native content handler may assume that the tags have been cloned for localization purposes.
Declaration
TagId TagId { get; set; }
Property Value
Type | Description |
---|---|
TagId |
Methods
AddSubSegment(ISubSegmentProperties)
Adds localizable content as a sub-segment for this tag.
Declaration
void AddSubSegment(ISubSegmentProperties localizableContent)
Parameters
Type | Name | Description |
---|---|---|
ISubSegmentProperties | localizableContent |
Remarks
The sub-segments can be accessed through LocalizableContent, where they are sorted in the order in which they appear.
AddSubSegments(IEnumerable<ISubSegmentProperties>)
Adds a collection of localizable sub-segments for this tag.
Declaration
void AddSubSegments(IEnumerable<ISubSegmentProperties> localizableContent)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ISubSegmentProperties> | localizableContent |
ClearSubSegments()
Removes all localizable content for this tag.
Declaration
void ClearSubSegments()
RemoveSubSegment(ISubSegmentProperties)
Removes localizable content for this tag.
Declaration
void RemoveSubSegment(ISubSegmentProperties localizableContent)
Parameters
Type | Name | Description |
---|---|---|
ISubSegmentProperties | localizableContent | Localizable sub-segment to be removed |
Remarks
If the specified object is not part of the localizable content for this tag, nothing happens.
SortSubSegments()
Sorts the localizable sub-segments by start offset.
Declaration
void SortSubSegments()
Remarks
The collection is automatically sorted when calling AddSubSegment(ISubSegmentProperties). You should only need to call this method if the start offsets of segments are explicitly changed after they have been added to the tag.