CIMTranslations.AddTranslation (method)

Adds a CIMTranslation to the collection.
Syntax: Set object = object.AddTranslation ( TranslationString, LanguageName )
Parameters:
TranslationString As String -
LanguageName As String -
Description: Adds a CIMTranslation to this collection. If the translation for the specified language already exists, this will change the value of the existing translation to the TranslationString passed. The language is case insensitive so "JPN", is the same as "jpn". The language must already be added to the CIMLangMap or this will method will fail.

Example:

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