Class CultureImpact
Represents the impact of a culture set.
Inheritance
Namespace: Umbraco.Cms.Core.Models
Assembly: Umbraco.Core.dll
Syntax
public sealed class CultureImpact
Remarks
A set of cultures can be either all cultures (including the invariant culture), or the invariant culture, or a specific culture.
Properties
View SourceAll
Gets the impact of 'all' cultures (including the invariant culture).
Declaration
public static CultureImpact All { get; }
Property Value
| Type | Description |
|---|---|
| CultureImpact |
AllowEditInvariantFromNonDefault
Declaration
public bool AllowEditInvariantFromNonDefault { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Culture
Gets the culture code.
Declaration
public string Culture { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
Can be null (invariant) or * (all cultures) or a specific culture code.
CultureBehavior
Declaration
public CultureImpact.Behavior CultureBehavior { get; }
Property Value
| Type | Description |
|---|---|
| CultureImpact.Behavior |
ImpactsAllCultures
Gets a value indicating whether this impact impacts all cultures, including, indirectly, the invariant culture.
Declaration
public bool ImpactsAllCultures { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ImpactsAlsoInvariantProperties
Gets a value indicating whether this also impact impacts the invariant properties, even though it does not impact the invariant culture, neither directly (ImpactsInvariantCulture) nor indirectly (ImpactsAllCultures).
Declaration
public bool ImpactsAlsoInvariantProperties { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ImpactsExplicitCulture
Gets a value indicating whether this impact impacts an implicit culture.
Declaration
public bool ImpactsExplicitCulture { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
And then it does not impact the invariant culture. The impacted explicit culture could be the default culture.
ImpactsInvariantProperties
Gets a value indicating whether this impact impacts the invariant properties, either directly, or because all cultures are impacted, or because the default culture is impacted.
Declaration
public bool ImpactsInvariantProperties { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ImpactsOnlyDefaultCulture
Gets a value indicating whether this impact impacts the default culture, directly, not because all cultures are impacted.
Declaration
public bool ImpactsOnlyDefaultCulture { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ImpactsOnlyInvariantCulture
Gets a value indicating whether this impact impacts only the invariant culture, directly, not because all cultures are impacted.
Declaration
public bool ImpactsOnlyInvariantCulture { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Invariant
Gets the impact of the invariant culture.
Declaration
public static CultureImpact Invariant { get; }
Property Value
| Type | Description |
|---|---|
| CultureImpact |
Methods
View SourceCreate(String, Boolean, IContent)
Creates an impact instance representing the impact of a culture set, in the context of a content item variation.
Declaration
public static CultureImpact Create(string culture, bool isDefault, IContent content)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | culture | The culture code. |
| System.Boolean | isDefault | A value indicating whether the culture is the default culture. |
| IContent | content | The content item. |
Returns
| Type | Description |
|---|---|
| CultureImpact |
Remarks
Validates that the culture is compatible with the variation.
Explicit(String, Boolean)
Creates an impact instance representing the impact of a specific culture.
Declaration
public static CultureImpact Explicit(string culture, bool isDefault)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | culture | The culture code. |
| System.Boolean | isDefault | A value indicating whether the culture is the default culture. |
Returns
| Type | Description |
|---|---|
| CultureImpact |
GetCultureForInvariantErrors(IContent, String[], String)
Utility method to return the culture used for invariant property errors based on what cultures are being actively saved, the default culture and the state of the current content item
Declaration
public static string GetCultureForInvariantErrors(IContent content, string[] savingCultures, string defaultCulture)
Parameters
| Type | Name | Description |
|---|---|---|
| IContent | content | |
| System.String[] | savingCultures | |
| System.String | defaultCulture |
Returns
| Type | Description |
|---|---|
| System.String |