Represents a Language. Installed languages can be found in the settings section.
Represents a Language. Installed languages can be found in the settings section.
Namespace: Umbraco.Cms.Core.Models
Assembly: Umbraco.Core.dll
All samples in this document will require references to the following dll:
Umbraco.Core.dll
All samples in this document will require the following using statement:
Constructor for creating a new Language
object where the necessary parameter are the global settings as GlobalSettings
and the isoCode as a string
.
To create a new Language the global setting parameter is necessary. You can find more info about how to use configuration in code in the Config article.
Gets the CultureInfo object for the language.
Gets or sets the culture name of the language.
Gets or sets the identifier of a fallback language. 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.
Gets or sets a value indicating whether the language is the default language.
Gets or sets a value indicating whether the language is mandatory. 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.
Gets or sets the ISO code of the language.