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

Class ILanguageBranchRepositoryExtensions

Contains extension methods for ILanguageBranchRepository.

Inheritance
System.Object
ILanguageBranchRepositoryExtensions
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.DataAbstraction
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
public static class ILanguageBranchRepositoryExtensions

Methods

Disable(ILanguageBranchRepository, CultureInfo)

Disables a language branch.

Declaration
public static bool Disable(this ILanguageBranchRepository languageBranchRepository, CultureInfo language)
Parameters
Type Name Description
ILanguageBranchRepository languageBranchRepository

The language branch repository.

System.Globalization.CultureInfo language

The language branch to disable

Returns
Type Description
System.Boolean

True if the language branch was enabled and had to be disabled; False if the branch wasn't enabled.

Enable(ILanguageBranchRepository, CultureInfo)

Enables a language branch.

Declaration
public static bool Enable(this ILanguageBranchRepository languageBranchRepository, CultureInfo language)
Parameters
Type Name Description
ILanguageBranchRepository languageBranchRepository

The language branch repository.

System.Globalization.CultureInfo language

The language branch to enable

Returns
Type Description
System.Boolean

True if the language branch was disabled and had to be enabled; False if it was already enabled.

Load(ILanguageBranchRepository, String)

Loads the specified language branch with specified culture name.

Declaration
public static LanguageBranch Load(this ILanguageBranchRepository languageBranchRepository, string cultureName)
Parameters
Type Name Description
ILanguageBranchRepository languageBranchRepository

The language branch repository.

System.String cultureName

The name of the culture, e.g. "en"

Returns
Type Description
LanguageBranch
Remarks

Unlike Load(CultureInfo) this method does not throw exception for invalid language codes. Instead null is returned.