CIMTranslations.Item (read-only property)

Gets the CIMTranslation at the specified index.
Syntax: Set object = object.Item ( Index )
Index As VARIANT* -
Description: Gets the CIMTranslation at the specified index. The index corresponds to the index of the CIMLanguage in the CIMLanguages collection that the particular translation is for. If there is no tranlation for that language the object retrieved will be nothing.


Sub Translations_Example()
    Dim oLangMap As CIMLangMapper.CIMLangMap
    Dim oTranslationGroup As CIMLangMapper.CIMTranslationGroup
    Dim oTranslation As CIMLangMapper.CIMTranslation
    Dim oTranslations As CIMLangMapper.CIMTranslations
    Dim Index As Long
    Set oLangMap = CreateObject("CIMLangMapper.CIMLangMap")
    oLangMap.Load "c:\trans.clm"
    Set oTranslationGroup = oLangMap.LookupTranslationGroup("Wheel bearing")
    if Not oTranslationGroup Is Nothing Then
      Set oTranslations = oTranslationGroup.Translations
      For Index = 0 to oTranslations.Count - 1
        Set oTranslation = oTranslations.Item(Index)
        if Not oTranslation Is Nothing Then
          MsgBox oTranslation.Value
        End If
      Next Index
    End If
End Sub