Namespace: Consultingwerk.SmartFramework.System
Class 
TranslationProvider Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object
Implements: Consultingwerk.SmartFramework.ITranslationProvider

/*&GLOBAL-DEFINE SmartLockGlobalSharedVariables SmartLockGlobalSharedVariables



Top Method Summary
Options Name Purpose
CacheAllTranslations () Caches all translations for the current language
CacheTranslationsByScope (character) Caches all translations by a given scope
CHARACTER GetTranslationByKey (character, character) Returns a translation based on a key value and an optional scope
CHARACTER GetTranslationByKey (character, character, character) Returns a translation based on a key value and an optional scope
CHARACTER GetTranslationByString (character, character) Returns a translation for a string value and an optional scope
LOGICAL IsScopeCached (character) Returns if the translations of a scope have been cached for the current session language
LanguageKeyChangedHandler () Event handler for the LanguageKeyChanged handler of the SessionManager

Top Constructor Summary
Options Name Purpose
TranslationProvider () Constructor for the TranslationProvider class

Top Property Summary
Options Name Purpose
LOGICAL AllTranslationsCached
LOGICAL DontFetchTranslationsWhenAllTranslationsCached
LOGICAL KeepTranslationCacheOnLanguageChange
LOGICAL UseEmptyScopeAsFallback


Method Detail
Top

CacheAllTranslations ()

Purpose: Caches all translations for the current language
Notes: Useful to avoid AppServer calls when multiple translations are
required

Top

CacheTranslationsByScope (character)

Purpose: Caches all translations by a given scope
Notes: Useful to avoid AppServer calls when multiple translations are
required in a row

Parameters:
pcScope CHARACTER
The scope to retrieve from the back end
Top

CHARACTER GetTranslationByKey (character, character)

Purpose: Returns a translation based on a key value and an optional scope
Notes: Returns ? when no translation is available

Parameters:
pcScope CHARACTER
The optional translation scope
pcKey CHARACTER
The translation key value to return
Returns CHARACTER
The translated string
Top

CHARACTER GetTranslationByKey (character, character, character)

Purpose: Returns a translation based on a key value and an optional scope
Notes: Returns ? when no translation is available

Parameters:
pcScope CHARACTER
The optional translation scope
pcKey CHARACTER
The translation key value to return
pcDefaultString CHARACTER
The optional default string to return when no translation is available
Returns CHARACTER
The translated string
Top

CHARACTER GetTranslationByString (character, character)

Purpose: Returns a translation for a string value and an optional scope
Notes: Returns the original string when no translation is available

Parameters:
pcScope CHARACTER
The optional translation scope
pcOriginalString CHARACTER
The original string to translate
Returns CHARACTER
The translated string
Top

LOGICAL IsScopeCached (character)

Purpose: Returns if the translations of a scope have been cached for the
current session language
Notes: SCL-6280

Parameters:
pcScope CHARACTER
The translation scope
Returns LOGICAL
Logical value indicating if the scope has been cached through CacheTranslationsByScope in the current language
Top

LanguageKeyChangedHandler ()

Purpose: Event handler for the LanguageKeyChanged handler of the SessionManager
Notes: Clears all translation cache
SCL-6346: Only when the language changes from one language to
another. A change to "" (SessionManager:ResetProperties) keeps
the cache, so does the restore of the previous language. The
cache is keyed by language, so translations looked up while
the language key is "" are never returned for another language



Constructor Detail
Top

TranslationProvider ()

Purpose: Constructor for the TranslationProvider class
Notes:



Property Detail
Top

LOGICAL AllTranslationsCached


Returns LOGICAL
Top

LOGICAL DontFetchTranslationsWhenAllTranslationsCached


Returns LOGICAL
Top

LOGICAL KeepTranslationCacheOnLanguageChange


Returns LOGICAL
Top

LOGICAL UseEmptyScopeAsFallback


Returns LOGICAL


Temp-Table Detail


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       24.11.2026 10:10:25