RC-WinTrans Object Model Help |
TransUnitProperties.Add |
Adds a "TransUnitProperty" to the collection.
Syntax: |
Add( Name As XLIFFTransUnitAttributes, Value As String, NamespaceURI As String, ExtendedName As String) As TransUnitProperty |
Return: | TransUnitProperty |
Parameters: |
Name Name of the property, element of the "XLIFFTransUnitAttributes" enumeration. If the name is not an XLIFF attribute, the name "transunit_x_extended" must be used. Value Value of the property. NamespaceURI Namespace URI of the property. If the property is an XLIFF attribute, the namespace URI is an empty string. ExtendedName If the property is an XLIFF attribute, the extended name is an empty string. Otherwise the extended name should begin with "x_".
|
Example: | ' Load TUs with Properties Dim ProjFile As ProjectFile Set ProjFile = Application.ActiveProjectFile If (ProjFile.IsLoaded = False) Then Call ProjFile.Load("", "fr") End If Dim TUProps As TransUnitProperties Set TUProps = ProjFile.TransUnits.Item(1).Properties ' Add Property Dim TUProp As TransUnitProperty Dim OtherTUProp As TransUnitProperty Set TUProp = TUProps.Add(transunit_translate, "yes", "", "") Set OtherTUProp = TUProps.Add(transunit_x_extended, "MyValue", "x_myproperty", "http://www.mydomain.com") ' Remove Property Call TUProps.Remove("transunit_translate", "") Call TUProps.Remove("x_myproperty", "http://www.mydomain.com") |
See also: