ISLanguageUtils.TranslateByDict

Description

This function translates the specified text by the dictionary.

Syntax

object.TranslateByDict(aDictionaryId, aText)

Part Attribute Type Description
object Required
The object always implements the ISLanguageUtils interface
aDictionaryId In, Required
int
Id of the dictionary
aText In, Required
string
The text that should be translated

Return Value

string

Returns the translation of the specified text by the dictionary.

Example

Display the specified text translated by the dictionary.

sub Main()
  Dim aLanguageUtils
  Dim aPatient
  Dim aLangCode
  Dim aKeeper
  Dim aMessage

  Set aLanguageUtils = Profile.LanguageUtils
  set aPatient = Profile.SelectPatient
  aLangCode = Profile.LanguageUtils.GetUILanguage
  set aKeeper = Profile.LanguageUtils.GetLanguageKeeper(aLangCode)
  
  aMessage = t("Age") & ": " & aPatient.Age & vbNewLine &_
    t("DOB") & ": " & aPatient.DOB & vbNewLine &_
    t("Patient ID Title") & ": " & Profile.CountryInfo.PatientIDTitle  
   
  Profile.MsgBox(aMessage)
  set aKeeper = Nothing
end Sub

function t(aText)
  
  t = Profile.LanguageUtils.TranslateByDict(1, aText)
end function    
Note:

Version information

Added in v7.9.0