Content Studio Web Content Management System
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
More specialized components that work with MLC can be inherited from
the MLCBaseclass.
The method determines the language to be localized i the following order.
[This is preliminary documentation and is subject to change.]
Provides support for components that needs to be MLC aware, by
localizing the supplied category or presentation template from the
current document, or the preferred language of the visitor.
Namespace: ContentStudio.Site.ActiveScripting
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
protected void SyncronizeMLC( bool useRoot, bool checkLanguageCookie, bool allowNonMlcParent, ref int selectedCategory, ref int presentationTemplate )
Parameters
- useRoot
- Type: SystemBoolean
Specifies the if root document should be checked (makes a difference only if the current document is an include). - checkLanguageCookie
- Type: SystemBoolean
Specifies if the code can get the localized version from the the cookie CS_Language. - allowNonMlcParent
- Type: SystemBoolean
Specifies if is should be acceptable to use a presentation template that not is an MLC document. - selectedCategory
- Type: SystemInt32
The MLC category member that should be localized. This parameter will be updated with the localized version of the MLC category, when the method returns. - presentationTemplate
- Type: SystemInt32
The MLC presentation template to be localized. Pass zero if the presentation template does not exists or should not be localized. Otherwise,this parameter will be updated with the localized presentation template, when the method returns.
Exceptions
Exception | Condition |
---|---|
CSException |
One of the following conditions:
|
InvalidOperationException | Cannot determine the MLC language and the actual document is not an MLC document. |
SqlException | An error occured when executing the command against the Content Studio database |
Remarks
- If checkLanguageCookie is set, use a cookie named CS_Language.
- If a language code named lang is supplied in the query string, use that value,
- If the language is defined in the current document, use that value.
- If useRoot is set, use the language of the root document.
See Also