Class LanguageLoaderOption

Specifies settings for language handling during loading.

Inheritance
System.Object
LanguageLoaderOption
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
public class LanguageLoaderOption : LoaderOption

Constructors

LanguageLoaderOption()

Creates a new instance of LanguageLoaderOption

Declaration
public LanguageLoaderOption()

Properties

FallbackBehaviour

Specifies which behaviour regarding fallback/replacement languages that should be used when loading content.

Declaration
public LanguageBehaviour FallbackBehaviour { get; set; }
Property Value
Type Description
LanguageBehaviour

Language

Gets or sets the language branch that should be used when loading content.

Declaration
public CultureInfo Language { get; set; }
Property Value
Type Description
System.Globalization.CultureInfo
Remarks

If not set or set to null, the preferred language branch will be retrieved from the current context.
If set to System.Globalization.CultureInfo.InvariantCulture, content will be loaded from the master language branch.

Methods

Fallback(CultureInfo)

Returns an instance of LanguageLoaderOption specified to load a langauge version for a IContent instance with fallback option if for example language version is not published.

Declaration
public static LanguageLoaderOption Fallback(CultureInfo language = null)
Parameters
Type Name Description
System.Globalization.CultureInfo language

The language version to load

Returns
Type Description
LanguageLoaderOption

A loader option

FallbackWithMaster(CultureInfo)

Returns an instance of LanguageLoaderOption specified to load a langauge version for a IContent instance with fallback option if for example language version is not published. If no other fallback is found it fallbacks to master langauge version.

Declaration
public static LanguageLoaderOption FallbackWithMaster(CultureInfo language = null)
Parameters
Type Name Description
System.Globalization.CultureInfo language

The language version to load

Returns
Type Description
LanguageLoaderOption

A loader option

MasterLanguage()

Returns an instance of LanguageLoaderOption that specifies to load master langauge version for a IContent instance.

Declaration
public static LanguageLoaderOption MasterLanguage()
Returns
Type Description
LanguageLoaderOption

A loader option

Specific(CultureInfo)

Returns an instance of LanguageLoaderOption specified to load a specific langauge version for a IContent instance with no fallback option.

Declaration
public static LanguageLoaderOption Specific(CultureInfo language = null)
Parameters
Type Name Description
System.Globalization.CultureInfo language

The language version to load

Returns
Type Description
LanguageLoaderOption

A loader option

Extension Methods