Class LanguageSelectorFactory
Creates language selectors for different scenarios.
Inheritance
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 8.11.0Syntax
[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 |