AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

DomainLanguageHelper..::..GetDefaultLanguage Method

Returns the framework's default Language for the given domain: the primary active language (IsPrimary == true), falling back to the lowest-ID active language of the domain. Used as the safety-net resolution when language can't be resolved by cookie/parameter/slug.

Namespace:  AdvantageCMS.Core.Utils
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


public static Language GetDefaultLanguage(
	SQL currentSql,
	Domain domain
)

Parameters

currentSql
Type: AdvantageCMS.Data..::..SQL
The current SQL connection.
domain
Type: AdvantageCMS.Core.Common.BusinessEntity..::..Domain
The domain whose default language to resolve.

Return Value

The default Language, or null if the domain has no active languages.