LanguageStore

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalBoolean LanguageStore( SalString sKey,
		       SalString sValue )

The LanguageStore method stores a value in the cache and keeps it there as long as the current language stays active. The value is removed form the cache the next time a session is opened (when the user logs on), or when the language changes.

Parameters

Name Description
SalString sKey Unique key that identifies the value.
SalString sValue The value to be stored in the cache.

Returns

The return value is TRUE if the method succeeds and FALSE if it fails.

Example

If Not Cache.LanguageRetrieve( 'Description.Field1', sFieldDesc )
   If DbPLSQLBlock( c_hSql,
      'A&o.Language_SYS.Translate_Lu_Prompt( ..., :sFieldDesc )
       Call Cache.LanguageStore( 'Description.Field1', sFieldDesc )
C# code
if (!(Var.Cache.LanguageRetrieve("LOV." + __sViewName, ref sCacheValue))) 
{
	// Fetch LOV properties from server
	if (!(DbPLSQLBlock(cSessionManager.c_hSql, "&AO.Reference_SYS.Get_Lov_Properties_( :i_hWndSelf.cDialogDynamicLov.__sViewName,\r\n" +
		":i_hWndSelf.cDialogDynamicLov.__sKeyNameList, :i_hWndSelf.cDialogDynamicLov.__sColumnNameList,\r\n" +
		":i_hWndSelf.cDialogDynamicLov.__sColumnPromptList, :i_hWndSelf.cDialogDynamicLov.__sColumnDataTypeList,\r\n" +
		":i_hWndSelf.cDialogDynamicLov.__sColumnRefList, :i_hWndSelf.cDialogDynamicLov.__sColumnDbNameList,\r\n" +
		":i_hWndSelf.cDialogDynamicLov.__sSortInfo )"))) 
	{
		return false;
	}
	sCacheValue = __sKeyNameList + Const.strTAB + __sColumnNameList + Const.strTAB + __sColumnPromptList + Const.strTAB + __sColumnDataTypeList + Const.strTAB + __sColumnRefList + Const.strTAB + __sColumnDbNameList + Const.strTAB + __sSortInfo;
	// Cache info for faster retrieval next time
	Var.Cache.LanguageStore("LOV." + __sViewName, sCacheValue);
}