ISLanguageUtils.GetLanguageKeeper

Description

This function returns the keeper object that provides using of the specified language inside the business logic until this keeper is not destroyed.

Syntax

object.GetLanguageKeeper(aLangCode)

Part Attribute Type Description
object Required
The object always implements the ISLanguageUtils interface
aLangCode In, Required
string
The language code

Return Value

object

Returns some information about the selected patient using the current UI language.

Example

Display some information about the selected patient using the current UI language.

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