Try our conversational search powered by Generative AI!

Interface IContentLanguageSettingsHandler

Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 7.19.2
Syntax
public interface IContentLanguageSettingsHandler

Methods

Get(ContentReference)

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

Declaration
ContentLanguageSetting[] Get(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
ContentLanguageSetting[]

A ContentLanguageSetting[] with the language settings for the given content.

Get(ContentReference, String)

Gets the settings for specified content link and language.

Declaration
ContentLanguageSetting Get(ContentReference contentLink, string languageBranch)
Parameters
Type Name Description
ContentReference contentLink

The content link.

System.String languageBranch

The language branch.

Returns
Type Description
ContentLanguageSetting

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

GetClosestSetting(ContentReference)

Gets the closest ancestor that has language settings.

Declaration
ContentReference GetClosestSetting(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
ContentReference

The closest ancestor that has language settings.

GetDefaultAllowedLanguage(ContentReference)

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

Declaration
string GetDefaultAllowedLanguage(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content to fetch language for

Returns
Type Description
System.String

GetFallbackLanguages(ContentReference, String)

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

Declaration
string[] GetFallbackLanguages(ContentReference conentLink, string languageBranch)
Parameters
Type Name Description
ContentReference conentLink

The content 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 content and language an empty string array is returned.

IsLanguageAllowed(ContentReference, String)

Checks if a language is available for a content

Declaration
bool IsLanguageAllowed(ContentReference contentLink, string languageBranch)
Parameters
Type Name Description
ContentReference contentLink

The content to check

System.String languageBranch

The language to check

Returns
Type Description
System.Boolean

True if the language is allowed on the content

IsLanguageAllowedForCreation(ContentReference, String)

Determins if a content is allowed in a specific language

Declaration
bool IsLanguageAllowedForCreation(ContentReference contentLink, string languageBranch)
Parameters
Type Name Description
ContentReference contentLink

The content to check

System.String languageBranch

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

Returns
Type Description
System.Boolean

True if the language is allowed for the content

Remarks

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

IsSettingsDefined(ContentReference)

Determines whether there exists language settings for the given content.

Declaration
bool IsSettingsDefined(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

Returns
Type Description
System.Boolean

true if language settings exists; otherwise, false.

Extension Methods