Try our conversational search powered by Generative AI!

Interface IPageLanguageSettingsHandler

Defines signature for handler of PageLanguageSettings

Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 7.19.2
Syntax
[Obsolete("Use IContentLanguageSettingsHandler instead")]
public interface IPageLanguageSettingsHandler

Methods

Get(PageReference)

Gets the settings for all languages for the specified page link.

Declaration
PageLanguageSetting[] Get(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink

The page link.

Returns
Type Description
PageLanguageSetting[]

An PageLanguageSetting[] with the language settings for the given page.

Get(PageReference, String)

Gets the settings for specified page link and language.

Declaration
PageLanguageSetting Get(PageReference pageLink, string languageBranch)
Parameters
Type Name Description
PageReference pageLink

The page link.

System.String languageBranch

The language branch.

Returns
Type Description
PageLanguageSetting

Gets the affective language settings for the page and language or null if no settings exists.

GetClosestSetting(PageReference)

Gets the closest ancestor that has language settings.

Declaration
PageReference GetClosestSetting(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink

The page link.

Returns
Type Description
PageReference

The closest ancestor that has language settings.

GetDefaultAllowedLanguage(PageReference)

Try finding the default language if allowed, otherwise fallback to the first allowed language found

Declaration
string GetDefaultAllowedLanguage(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink

The page to fetch language for

Returns
Type Description
System.String

GetFallbackLanguages(PageReference, String)

Gets the fallback languages for the current page and language if any exists.

Declaration
string[] GetFallbackLanguages(PageReference pageLink, string languageBranch)
Parameters
Type Name Description
PageReference pageLink

The page link.

System.String languageBranch

The language branch.

Returns
Type Description
System.String[]

A String[] with the names of the fallback languages.

Remarks

If no fallback languages are defined for the current page and language an empty string array is returned.

IsLanguageAllowed(PageReference, String)

Checks if a language is available for a page

Declaration
bool IsLanguageAllowed(PageReference pageLink, string languageBranch)
Parameters
Type Name Description
PageReference pageLink

The page to check

System.String languageBranch

The language to check

Returns
Type Description
System.Boolean

True if the language is allowed on the page

IsLanguageAllowedForCreation(PageReference, String)

Determins if a page is allowed in a specific language

Declaration
bool IsLanguageAllowedForCreation(PageReference pageLink, string languageBranch)
Parameters
Type Name Description
PageReference pageLink

The page to check

System.String languageBranch

The language to check if it's allowed for the page

Returns
Type Description
System.Boolean

True if the language is allowed for the page

Remarks

If no restrictions set on pages, the language must at least be part of the enabled languages for the site

IsSettingsDefined(PageReference)

Determines whether there exists language settings for the given page.

Declaration
bool IsSettingsDefined(PageReference pageLink)
Parameters
Type Name Description
PageReference pageLink

The page link.

Returns
Type Description
System.Boolean

true if language settings exists; otherwise, false.

Extension Methods