CIMTranslationGroup.AddTranslation (method)

Adds a translation to the group.
Syntax: Set object = object.AddTranslation ( TranslationString, LanguageName )
TranslationString As String -
LanguageName As String -
Description: Adds a translation to the group. If the translation for the specified language already exists, this will change the value of the existing translation to the TranslationString passed. The language must already be added to the CIMLangMap or this will method will fail.


Sub AddTranslation_Example()
    Dim oLangMap As CIMLangMapper.CIMLangMap
    Dim oTranslationGroup As CIMLangMapper.CIMTranslationGroup
    Dim oTranslation As CIMLangMapper.CIMTranslation
    Dim oLanguage As CIMLangMapper.CIMLanguage
    Set oLangMap = CreateObject("CIMLangMapper.CIMLangMap")
    oLangMap.Load "c:\trans.clm"
    Set oTranslationGroup = oLangMap.LookupTranslationGroup("Hello")
    Set oLanguage = oLangMap.AddLanguage("SPA", 1034)
    if Not oTranslationGroup Is Nothing Then
      Set oTranslation = oTranslationGroup.AddTranslation("Hola", "SPA")
    End If
End Sub
See Also: CIMTranslation , CIMTranslations.AddTranslation