Class UserInterfaceLanguage
Implementation of the LanguageSelection class.
Inherited Members
Namespace: EPiServer.Globalization
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7Syntax
public class UserInterfaceLanguage : LanguageSelection
Constructors
UserInterfaceLanguage(LocalizationService)
Initializes a new instance of the LanguageSelection class.
Declaration
protected UserInterfaceLanguage(LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
LocalizationService | localizationService |
Remarks
The constructor is protected to prevent this class from being instantiated directly, but it should still be possible to inherit from this class. Access should be through the Instance property.
Properties
FinalFallbackCulture
Read-only fallback culture System.Globalization.CultureInfo type property.
Declaration
public override CultureInfo FinalFallbackCulture { get; }
Property Value
Type | Description |
---|---|
System.Globalization.CultureInfo |
Overrides
Instance
Gets or sets the instance of LanguageSelection to use.
Declaration
public static UserInterfaceLanguage Instance { get; set; }
Property Value
Type | Description |
---|---|
UserInterfaceLanguage | The instance. |
Remarks
Assigning to this property allows you to completely replace how the culture/user interface language is determined.
Methods
DetermineCulture(LanguagePreferenceList)
Determines the culture based on the language preferences.
Declaration
public override CultureInfo DetermineCulture(LanguagePreferenceList languagePreference)
Parameters
Type | Name | Description |
---|---|---|
LanguagePreferenceList | languagePreference | The language preferences. |
Returns
Type | Description |
---|---|
System.Globalization.CultureInfo | A CultureInfo object representing the selected language. |
Overrides
DetermineEPiServerUserInterfaceCulture()
Determines the user interface culture when inside the EPiServer CMS user interface url namespaces. This might be used if your outside the EPiServer user interfaces and want to determine the users UI language when inside the EPiServer user interfaces.
Declaration
public CultureInfo DetermineEPiServerUserInterfaceCulture()
Returns
Type | Description |
---|---|
System.Globalization.CultureInfo | The System.Globalization.CultureInfo that will be used inside the EPiServer user interfaces |
LanguagePreferenceList(String)
Get a list of language codes.
Declaration
public override LanguagePreferenceList LanguagePreferenceList(string priorityLanguage)
Parameters
Type | Name | Description |
---|---|---|
System.String | priorityLanguage | The priority language. |
Returns
Type | Description |
---|---|
LanguagePreferenceList | A LanguagePreferenceList sorted in preference order. |
Overrides
SetCulture(String)
Sets the culture for the user interface language.
Declaration
public override CultureInfo SetCulture(string priorityLanguage)
Parameters
Type | Name | Description |
---|---|---|
System.String | priorityLanguage | The priority language. |
Returns
Type | Description |
---|---|
System.Globalization.CultureInfo |
Overrides
Remarks
The priorityLanguage parameter is available to help implementing simple overrides of the language selection mechanism by putting the priority language first in the language preference list.