Gets the language of the item.
A language defines an aspect of an item, that relates to a spoken language. A content item can have content in multiple languages and there may be multiple versions of an item in a given language. The language name may be an abitrary string, but is recommended to use the ISO code of the language.
This example gets the french text field of an item.
public string GetFrenchText(ID id) {
Language language = Language.Parse("fr");
Item item = Sitecore.Context.Database.Items[id, language];
if (item != null) {
return item["Text"];
}
return "";
}
Item Class | Sitecore.Data.Items Namespace