November Happy Hour will be moved to Thursday December 5th.

Class LanguageSelectorFactory

Creates language selectors for different scenarios.

Inheritance
System.Object
LanguageSelectorFactory
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: 11.20.7
Syntax
[ServiceConfiguration(ServiceType = typeof(LanguageSelectorFactory))]
public class LanguageSelectorFactory

Constructors

LanguageSelectorFactory()

Declaration
public LanguageSelectorFactory()

Methods

AutoDetect()

Creates a language selector that reads current language selection and enables fallback languages

Declaration
public virtual LanguageSelector AutoDetect()
Returns
Type Description
LanguageSelector

A language selector object

AutoDetect(Boolean)

Creates a language selector that reads current language selection and enables fallback languages

Declaration
public virtual LanguageSelector AutoDetect(bool enableMasterLanguageFallback)
Parameters
Type Name Description
System.Boolean enableMasterLanguageFallback

Enable master language as a last resort for fallback instead of filtering a page

Returns
Type Description
LanguageSelector

A language selector object

Create(String)

Creates an ILanguageSelector for the specified language branch.

Declaration
public virtual LanguageSelector Create(string languageBranch)
Parameters
Type Name Description
System.String languageBranch

The prefered language branch (overrides user choice)

Returns
Type Description
LanguageSelector

A new ILanguageSelector for the specified language branch.

Fallback(String, Boolean)

Creates a language selector with a custom language selection and enables fallback languages

Declaration
public virtual LanguageSelector Fallback(string preferredLanguageBranch, bool enableMasterLanguageFallback)
Parameters
Type Name Description
System.String preferredLanguageBranch

The prefered language branch (overrides user choice)

System.Boolean enableMasterLanguageFallback

Enable master language as a last resort for fallback instead of filtering a page

Returns
Type Description
LanguageSelector

A language selector object

MasterLanguage()

Creates a language selector that always selects the master language of a page

Declaration
public virtual LanguageSelector MasterLanguage()
Returns
Type Description
LanguageSelector

A language selector object

Extension Methods