Class Language
Represents a Language.
Namespace: Umbraco.Cms.Core.Models
Assembly: Umbraco.Core.dll
Syntax
[DataContract(IsReference = true)]
public class Language : EntityBase, ILanguage, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
Constructors
View SourceLanguage(String, String)
Initializes a new instance of the Language class.
Declaration
public Language(string isoCode, string cultureName)
Parameters
Type | Name | Description |
---|---|---|
System.String | isoCode | The ISO code of the language. |
System.String | cultureName | The name of the language. |
Properties
View SourceCultureInfo
Gets the CultureInfo object for the language.
Declaration
[IgnoreDataMember]
public CultureInfo CultureInfo { get; }
Property Value
Type | Description |
---|---|
System.Globalization.CultureInfo |
CultureName
Gets or sets the culture name of the language.
Declaration
[DataMember]
public string CultureName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FallbackIsoCode
Gets or sets the ISO code of a fallback language.
Declaration
public string FallbackIsoCode { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
The fallback language can be used in multi-lingual scenarios, to help define fallback strategies when a value does not exist for a requested language.
FallbackLanguageId
Gets or sets the identifier of a fallback language.
Declaration
public int? FallbackLanguageId { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
Remarks
The fallback language can be used in multi-lingual scenarios, to help define fallback strategies when a value does not exist for a requested language.
IsDefault
Gets or sets a value indicating whether the language is the default language.
Declaration
public bool IsDefault { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsMandatory
Gets or sets a value indicating whether the language is mandatory.
Declaration
public bool IsMandatory { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
When a language is mandatory, a multi-lingual document cannot be published without that language being published, and unpublishing that language unpublishes the entire document.
IsoCode
Gets or sets the ISO code of the language.
Declaration
[DataMember]
public string IsoCode { get; set; }
Property Value
Type | Description |
---|---|
System.String |